我有两个 Spring Boot 应用程序:
cloud-config
它具有以下文件结构:
└───src
└───main
└───environment
└───default
├───application.yml
└───bootstrap.yml
...
application.yml
:server:
port: 8087
spring:
cloud:
config:
server:
git:
uri: ssh://path-to-repository.git
bootstrap.yml
:spring:
application:
name: cloud-config
main-application
:└───src
└───main
└───environment
└───default
├───bootstrap.yml
└───logback.xml
我有
application.yml
对于我的main-application
在 git 存储库中。 同样在 git 存储库中,我有带有属性的文件:
application-default.properties
.我要搬家
logback.xml
到 git 存储库以使用 spring-cloud 获取它。我怎样才能做到这一点?
最佳答案
为了解决我的任务,我做了以下工作:
logback.xml
到我的 Spring Cloud 存储库; logback.xml
来自 main > environment > default
目录; bootstrap.yml
的 main-application
模块:logging:
config: http://localhost:8087/main-application/default/master/logback.xml
logging: config:
路径:Serving plain text 关于spring - 如何将 Spring Cloud 与 logback 集成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42492763/