如何禁用jhipster注册表?

时间:2017-08-16 16:03:08

标签: registry jhipster

我已经使用注册表生成了jhipster单片应用程序。如何关闭注册表?我可以在DEV配置文件中启动应用程序,但它在PROD配置文件中崩溃并出现错误:

java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:132) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) at com.qitsoftware.arch3d.Arch3DApp.main(Arch3DApp.java:68) Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8761/config/Arch3D/prod/master": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:531) at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.getRemoteEnvironment(ConfigServicePropertySourceLocator.java:172) at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:93) ... 5 common frames omitted

1 个答案:

答案 0 :(得分:2)

通过在bootstrap-prod.yml

中禁用云发现并将fail-fast设置为false来找到解决方案
spring:
    cloud:
        discovery:
            enabled: false
        config:
            fail-fast: false