gpt4 book ai didi

java - 使用 Spring Boot 构建自己的配置服务器

转载 作者:行者123 更新时间:2023-12-02 02:52:47 25 4
gpt4 key购买 nike

你们中有人现在知道如何将我自己的配置服务器构建为微服务来存储和加载 .properties 文件吗?我发现 Spring Cloud Config 非常有趣,但是你使用 git 作为目标,在我的例子中它只是一个文件系统..感谢您的任何建议

最佳答案

Spring Cloud Config 还支持 native 文件系统后端,而不是 git 或 svn。您可以将其与以下选项一起使用

spring.profiles.active=native
spring.cloud.config.server.native.searchLocations= xxxx

您可以在官方文档的“文件系统后端”部分找到更多默认设置:http://cloud.spring.io/spring-cloud-static/spring-cloud-config/1.3.0.RELEASE/

关于java - 使用 Spring Boot 构建自己的配置服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43552529/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com