JHipster整体构建生产失败

我有一个整体的JHipster应用程序。我已经在"serviceDiscoveryType"中将false禁用为.yo-rc.json,但是 当我执行以下命令时

./mvnw -Pprod

我收到此例外

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:138)
        at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:97)
        at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:621)
        at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:365)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:310)
        at br.com.pactoebytes.GestaoFranquiasApp.main(GestaoFranquiasApp.java:65)
        at sun.reflect.NativeMethodaccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodaccessorImpl.invoke(NativeMethodaccessorImpl.java:62)
        at sun.reflect.DelegatingMethodaccessorImpl.invoke(DelegatingMethodaccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.web.client.ResourceaccessException: I/O error on GET request for "http://localhost:8761/config/GestaoFranquias/prod/master": Connection refused: connect; nested
e

是错误还是配置问题?

zrchuo 回答:JHipster整体构建生产失败

好吧,您可能不需要bootstrap.yml,因为您不使用服务发现或Spring Cloud配置服务器(即JHipster注册表),因此您的应用程序只需要application*.yml

尝试删除所有bootstrap*.yml个文件。

重新生成项目不会清除不需要的文件。

本文链接:https://www.f2er.com/3137686.html

大家都在问