Spring boot 向Spring云配置服务器添加多个存储库
我需要向配置服务器添加两个配置存储库。但是,它只选择一个配置存储库。谁能帮我解决这个问题 Config Server bootstrap.ymlSpring boot 向Spring云配置服务器添加多个存储库,spring-boot,spring-cloud,spring-cloud-config-server,Spring Boot,Spring Cloud,Spring Cloud Config Server,我需要向配置服务器添加两个配置存储库。但是,它只选择一个配置存储库。谁能帮我解决这个问题 Config Server bootstrap.yml server: port: 8899 spring: cloud: config: server: git: uri: https://github.com/pocuser9x/wednest-config-store search-paths: - 'wednest-config-stor
server:
port: 8899
spring:
cloud:
config:
server:
git:
uri: https://github.com/pocuser9x/wednest-config-store
search-paths:
- 'wednest-config-store/*service'
repos:
uri: https://github.com/pocuser9x/secure-config-store
在我有以下文件
事件服务.yml
event-service-dev.yml
event service stg.yml
这些文件拾取正确
在我下面的文件
event-service-prod.yml
此文件未拾取。我认为您正在寻找的是复合回购功能。这是有案可查的 对您来说,这将类似于:
spring:
profiles:
active: composite
cloud:
config:
server:
composite:
-
type: git
uri: https://github.com/pocuser9x/wednest-config-store
search-paths:
'wednest-config-store/*service'
-
type: git
uri: https://github.com/pocuser9x/secure-config-store
需要注意的是,文档显示的配置文件集如上所述,但我发现需要使用“include”而不是“active”。包含是附加的
profiles:
include: composite
我认为你正在寻找的是复合回购功能。这是有案可查的 对您来说,这将类似于:
spring:
profiles:
active: composite
cloud:
config:
server:
composite:
-
type: git
uri: https://github.com/pocuser9x/wednest-config-store
search-paths:
'wednest-config-store/*service'
-
type: git
uri: https://github.com/pocuser9x/secure-config-store
需要注意的是,文档显示的配置文件集如上所述,但我发现需要使用“include”而不是“active”。包含是附加的
profiles:
include: composite
它似乎是…的复制品它似乎是…的复制品