打印横幅后 Jhipster 应用程序在 Pivotal Cloud Foundry 上挂起
Jhipster application hangs on Pivotal Cloud Foundry after printing banner
我使用以下方法创建了一个 JHipster 应用程序
yo jhipster
yo jhipster:cloudfoundry
但是,当我推送到 PCF 时,应用程序启动,在打印横幅后挂起并在一分钟后被杀死。
我尝试过的唯一定制是更改某些属性中的 URL 以指向部署在 cloudfoundry 上的 JHipster 注册表,如 the jhipster documentation 中所述。
这是我的 .yo-rc.json 文件:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.myapp"
},
"jhipsterVersion": "4.3.0",
"baseName": "test",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8081",
"authenticationType": "jwt",
"hibernateCache": "hazelcast",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "gradle",
"enableSocialSignIn": false,
"jwtSecretKey": "bec0ab8352f04338c8c1db2fd572022c1bf877fe",
"enableTranslation": false,
"applicationType": "microservice",
"testFrameworks": [],
"jhiPrefix": "jhi",
"skipClient": true,
"skipUserManagement": true,
"clientPackageManager": "yarn"
}
}
应用程序需要正确配置才能使用 JHipster Documentation: Doing Microservices 中所述的注册表。
In the bootstrap-prod.yml file, the spring.cloud.config.uri must point to http:///config/
In the application-prod.yml file, the eureka.client.serviceUrl.defaultZone must point to http:///eureka/
默认情况下,JHipster 注册表使用 admin:admin 用户进行身份验证,因此上述文件也需要按照 the Spring Cloud docs.
中所述进行配置
spring:
cloud:
config:
uri: https://myconfig.mycompany.com
username: user
password: secret
我使用以下方法创建了一个 JHipster 应用程序
yo jhipster
yo jhipster:cloudfoundry
但是,当我推送到 PCF 时,应用程序启动,在打印横幅后挂起并在一分钟后被杀死。
我尝试过的唯一定制是更改某些属性中的 URL 以指向部署在 cloudfoundry 上的 JHipster 注册表,如 the jhipster documentation 中所述。
这是我的 .yo-rc.json 文件:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.myapp"
},
"jhipsterVersion": "4.3.0",
"baseName": "test",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8081",
"authenticationType": "jwt",
"hibernateCache": "hazelcast",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "gradle",
"enableSocialSignIn": false,
"jwtSecretKey": "bec0ab8352f04338c8c1db2fd572022c1bf877fe",
"enableTranslation": false,
"applicationType": "microservice",
"testFrameworks": [],
"jhiPrefix": "jhi",
"skipClient": true,
"skipUserManagement": true,
"clientPackageManager": "yarn"
}
}
应用程序需要正确配置才能使用 JHipster Documentation: Doing Microservices 中所述的注册表。
In the bootstrap-prod.yml file, the spring.cloud.config.uri must point to http:///config/
In the application-prod.yml file, the eureka.client.serviceUrl.defaultZone must point to http:///eureka/
默认情况下,JHipster 注册表使用 admin:admin 用户进行身份验证,因此上述文件也需要按照 the Spring Cloud docs.
中所述进行配置spring:
cloud:
config:
uri: https://myconfig.mycompany.com
username: user
password: secret