2017-08-16 38 views
0

我已經使用註冊表生成了jhipster單片應用程序。我怎樣才能關閉註冊表?我可以在DEV配置文件啓動應用程序,但它有錯誤PROD輪廓崩潰:如何禁用jhipster註冊表?

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

+0

設置快速失敗的假。如果你想一個解決方案爲了完全擺脫註冊表,您可以通過編輯.yo-rc.json重新生成您的應用程序,重新生成並將更改合併到您的git repo中。否則,您可以嘗試https://stackoverflow.com/questions/35142105/eureka-discovery-client-selective-disable –

回答

1

發現禁用雲發現和bootstrap-prod.yml

spring: 
    cloud: 
     discovery: 
      enabled: false 
     config: 
      fail-fast: false