# spring-cloud-config **Repository Path**: liuww/spring-cloud-config ## Basic Information - **Project Name**: spring-cloud-config - **Description**: 远端配置 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-10-22 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # spring-cloud-config #### Description 远端配置 以下内容摘自[Spring Cloud构建微服务架构:分布式配置中心【Dalston版】](http://blog.didispace.com/spring-cloud-starter-dalston-3/) 访问配置信息的URL与配置文件的映射关系如下: ``` /{application}/{profile}[/{label}] /{application}-{profile}.yml /{label}/{application}-{profile}.yml /{application}-{profile}.properties /{label}/{application}-{profile}.properties ``` 上面的url会映射{application}-{profile}.properties对应的配置文件, 其中{label}对应Git上不同的分支,默认为master。 我们可以尝试构造不同的url来访问不同的配置内容, 比如,要访问master分支,config-client应用的dev环境, 就可以访问这个url:http://localhost:8201/config-client/dev/master 返回值 ``` { "name": "config-client", "profiles": [ "dev" ], "label": null, "version": "0f01abe69b675eafe82c8f1582c22ba47391cdb8", "state": null, "propertySources": [ { "name": "https://gitee.com/liuww/spring-cloud-config/config-client-dev.yml", "source": { "info.profile": "dev", "test": "test-dev" } }, { "name": "https://gitee.com/liuww/spring-cloud-config/config-client.properties", "source": { "info.profile": "default", "test": "test-default" } } ] } ``` 请求 http://localhost:8201/config-client.properties 返回值 ``` info.profile: default test: test-default ``` #### Software Architecture Software architecture description #### Installation 1. xxxx 2. xxxx 3. xxxx #### Instructions 1. xxxx 2. xxxx 3. xxxx #### Contribution 1. Fork the project 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request #### Gitee Feature 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 4. The most valuable open source project [GVP](https://gitee.com/gvp) 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)