如何将一个URI映射到spring-cloud-config服务器的application.yml中的另一个URI?
我正在尝试使用Jenkins部署我的spring-cloud-config-server应用程序。我已经将Git URL定义为<gitRepo>/{profile}-application.properties。因为我在没有发送配置文件的情况下部署应用程序,所以它采用默认值,因为配置文件和应用程序试图访问不存在的<gitRepo>/default-application.properties,因此作为jenkins管道的一部分,应用程序的健康检查失败。
现在我想将URI:<gitRepo>/default-application.properties映射到URI:<gitRepo>/cit-application.properties。
这可以在YML中完成吗?我发现了许多基于存储库的只有多个URI的方法,但这不是我想要的。
spring:
cloud:
config:
server:
git:
uri: https://<gitrepo>/{profile}-configuration.git
pattern:
- '*/default-configuration'
uri: https://<gitrepo>/cit-configuration.git发布于 2019-07-23 21:23:19
我们已经使用health check : enabled: false禁用了健康检查
这帮助我们解决了这个问题。
https://stackoverflow.com/questions/57119340
复制相似问题