2017-12-29 51 views
0
나는 아래 V4.13.0 jhipster 옵션과 jhipster 모 놀리 식 응용 프로그램 생성

:있어 401 오류 때 제작 프로파일에 배포 jhipster 모 놀리 식 응용 프로그램

>Monolithic 
> Do not use Jhipster Registry 
> authentication (stateless, with a token) 
> MySQL in production, H2 in-memory in development 
> ehcache 
> Gradle 
> Angular 5 
> Do not enable SASS 
> Do not enable i18n 
> No testing frameworks 
> Do not install other generators 

내가 JDBC 내용을 제외하고 응용 프로그램 prod.yml을 수정하지 않았다을; 내 각 ENV는

Angular CLI: 1.6.0 
Node: 9.3.0 
OS: linux x64 
Angular: 5.1.0 

패키지 다음 JH 가이드

./gradlew -Pprod clean bootRepackage 

build/libs/xx-0.0.1-SNAPSHOT.war 
---------------------------------------------------------- 
    Application 'xx' is running! Access URLs: 
    Local:  http://localhost:8080 
    External: http://127.0.0.1:8080 
    Profile(s):  [prod] 
---------------------------------------------------------- 

에 의해 실행되는하지만 http://localhost:8080 에 의해 브라우저에 의해 요청하면 그것은

o.z.p.spring.web.advice.AdviceTrait  : Unauthorized: Full authentication is required to access this resource 
있어

브라우저 측 오류는 다음과 같습니다

Request URL:http://localhost:8080/api/account 
Request Method:GET 
Status Code:401 Unauthorized 
Remote Address:[::1]:8080 
Referrer Policy:no-referrer-when-downgrade 

덕분에 누구와 어떤 도움에 미리!

나는 당신의 문제를 오해하지 않는 한
+0

당신은 같은 노드의 LTS 버전을 사용해야합니다 계정 권장 사항. –

답변

1

, 그것은 예상되는 동작입니다 : 먼저 토큰을 가져온 다음 액세스/API에 사용하는 인증/API /에 대해 인증해야합니다/