SpringBoot gitHub 配置服务器无法从 Repo 中的文件夹中读取
SpringBoot gitHub config server not able to read from folder in Repo
我正在使用基于 git 的配置文件开始 spring 引导。
This 是我的仓库。
在这里,我在 tolls-config 文件夹中有一些配置文件,这确实检索了配置文件
但是在教程中使用 this 存储库时它有效
API 通话:
localhost:8888/s1rates/default
我的问题
- 是否需要修改 API 调用
- 我的 uri 是否应该指向 repo 中的特定文件夹(我尝试放置文件夹 URL,它给出了 500)
- 每个配置文件都必须是它自己的 repo(没有办法
周围 )
我查看了您的存储库,您似乎将 searchPaths
的 属性 拼写错误,而不是像配置中那样拼写 search-paths
。
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
searchPaths: foo,bar*
我正在使用基于 git 的配置文件开始 spring 引导。 This 是我的仓库。 在这里,我在 tolls-config 文件夹中有一些配置文件,这确实检索了配置文件
但是在教程中使用 this 存储库时它有效
API 通话:
localhost:8888/s1rates/default
我的问题
- 是否需要修改 API 调用
- 我的 uri 是否应该指向 repo 中的特定文件夹(我尝试放置文件夹 URL,它给出了 500)
- 每个配置文件都必须是它自己的 repo(没有办法 周围 )
我查看了您的存储库,您似乎将 searchPaths
的 属性 拼写错误,而不是像配置中那样拼写 search-paths
。
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
searchPaths: foo,bar*