生成的jhipster项目给出了错误

时间:2017-07-18 10:43:31

标签: java spring jhipster

我已经使用以下设置生成了新的jhipster项目。试图登录管理界面,我收到错误 Failed to sign in! Please check your credentials and try again. 命令行显示以下错误。

[HPM] Error occurred while trying to proxy request /api/profile-info from localhost:9060 to http://127.0.0.1:8080 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common _system_errors)

我正在使用generator-jhipster@4.6.1。

使用jhipster配置

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.ae"
    },
    "jhipsterVersion": "4.6.1",
    "baseName": "ex",
    "packageName": "com.ae",
    "packageFolder": "com/ae",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "mysql",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "jwtSecretKey": "replaced-by-jhipster-info",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [
      "gatling"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": false
  }
}

环境和工具

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

git version 2.7.4

node: v6.11.1

npm: 5.0.3

yeoman: 2.0.0

yarn: 0.27.5

1 个答案:

答案 0 :(得分:1)

localhost:9060 to http://127.0.0.1:8080 (ECONNREFUSED) 

这意味着webpack-dev-server无法连接到您的Java应用程序以代理所有API调用,因此您可能只运行yarn start并忘记使用mvnw运行Java应用程序。见documentation