这个问题本来应该已经修好了 Github ticket 为什么我仍然在日志中看到这一点。
Config Server: Not found or not setup for this application
2017-10-30 15:03:53.740 INFO 24700 --- [ main] foo.bar.id.gateway.GatewayApp :
----------------------------------------------------------
Application 'Gateway' is running! Access URLs:
Local: http://localhost:8180
External: http://ipadddress:8180
Profile(s): [swagger, dev]
----------------------------------------------------------
2017-10-30 15:03:53.740 INFO 24700 --- [ main] foo.bar.id.gateway.GatewayApp :
----------------------------------------------------------
Config Server: Not found or not setup for this application
----------------------------------------------------------
2017-10-30 15:03:55.310 INFO 24700 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_AppGATEWAY/Gateway:2c4703cd1cbf3617def055e786113743: registering service...
2017-10-30 15:03:55.328 INFO 24700 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_AppGATEWAY/Gateway:2c4703cd1cbf3617def055e786113743 - registration status: 204
2017-10-30 15:08:20.870 INFO 24700 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
[1]: https://github.com/jhipster/generator-jhipster/issues/3166
答案 0 :(得分:0)
如果您希望配置服务器在您的应用程序启动时偶尔不可用,您可以让它在失败后继续尝试。首先,您需要设置 spring.cloud.config.fail-fast=true。然后你需要将 spring-retry 和 spring-boot-starter-aop 添加到你的类路径中。默认行为是重试六次,初始退避间隔为 1000 毫秒,后续退避的指数乘数为 1.1。您可以通过设置 spring.cloud.config.retry.* 配置属性来配置这些属性(和其他属性)。
文档: https://cloud.spring.io/spring-cloud-config/reference/html/#config-client-retry
答案 1 :(得分:0)
您需要在 GitHub 配置存储库中设置以下属性。
configserver:
name: JHipster Registry config server
status: Connected to the JHipster Registry config server, using https://github.com/jhipster/jhipster-registry-sample-config !