gpt4 book ai didi

registry - 如何禁用 jhipster 注册表?

转载 作者:行者123 更新时间:2023-12-02 22:01:00 26 4
gpt4 key购买 nike

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

java.lang.IllegalStateException:无法找到 PropertySource 并且设置了快速失败属性,在 org.springframework 的 org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:132) 处失败.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) 在 org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) 在 org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) )在 org.springframework.boot.SpringApplication.run(SpringApplication.java:301) 在 com.qitsoftware.arch3d.Arch3DApp.main(Arch3DApp.java:68)
引起:org.springframework.web.client.ResourceAccessException:“http://localhost:8761/config/Arch3D/prod/master”的 GET 请求上出现 I/O 错误:连接被拒绝(连接被拒绝);嵌套异常是java.net.ConnectException:连接被拒绝(连接被拒绝)在org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666)在org.springframework.web.client.RestTemplate.execute(RestTemplate.java) :613)在org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:531)在org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.getRemoteEnvironment(ConfigServicePropertySourceLocator.java:172)在org.springframework.cloud。 config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:93)
... 5个常用框架省略

最佳答案

通过在 bootstrap-prod.yml 中禁用云发现并将fail-fast设置为 false 找到了解决方案

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

关于registry - 如何禁用 jhipster 注册表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45718285/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com