spring cloud config配置

来源:互联网 发布:永恒之塔3.0数据库 编辑:程序博客网 时间:2024/04/30 18:16
"{[/encrypt/{name}/{profiles}],methods=[POST]}" 
"{[/decrypt/{name}/{profiles}],methods=[POST]}"
"{[/decrypt],methods=[POST]}" 
"{[/encrypt/status],methods=[GET]}"
"{[/key],methods=[GET]}"
"{[/key/{name}/{profiles}],methods=[GET]}" 
"{[/{name}-{profiles}.properties],methods=[GET]}" onto public org.springframework.h
"{[/{label}/{name}-{profiles}.properties],methods=[GET]}" o
"{[/{label}/{name}-{profiles}.json],methods=[GET]}" 
"{[/{name}-{profiles}.yml || /{name}-{profiles}.yaml],methods=[GET]}" onto public o
"{[/{name}/{profiles:.*[^-].*}],methods=[GET]}" onto public org.springframework.clo
"{[/{name}/{profiles}/{label:.*}],methods=[GET]}" onto public org.springframework.c
"{[/{name}-{profiles}.json],methods=[GET]}" onto public org.springframework.http.Re
"{[/{label}/{name}-{profiles}.yml || /{label}/{name}-{profiles}.yaml],methods=[GET]
"{[/{name}/{profile}/{label}/**],methods=[GET]}" onto public java.lang.String org.s
"{[/{name}/{profile}/{label}/**],methods=[GET],produces=[application/octet-stream]}
"{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java
"{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.Model
URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.
URL path [/**] onto handler of type [class org.springframework.web.servlet.resource
URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.serv
"{[/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java
"{[/metrics || /metrics.json],methods=[GET],produces=[application/json]}" onto publ
"{[/restart || /restart.json],methods=[POST]}" onto public java.lang.Object org.spr
"{[/pause || /pause.json],methods=[POST]}" onto public java.lang.Object org.springf
"{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}" onto pu
"{[/beans || /beans.json],methods=[GET],produces=[application/json]}" onto public j
"{[/dump || /dump.json],methods=[GET],produces=[application/json]}" onto public jav
"{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}" ont


比如didispace-dev.properties,name就是didispace,profiles就是dev,key就是该文件中的配置


获取git上的资源信息遵循如下规则:

/{application}/{profile}[/{label}]/{application}-{profile}.yml/{label}/{application}-{profile}.yml/{application}-{profile}.properties/{label}/{application}-{profile}.properties
  • 1
  • 2
  • 3
  • 4
  • 5
  • application:表示应用名称,在client中通过spring.config.name配置
  • profile:表示获取指定环境下配置,例如开发环境、测试环境、生产环境 默认值default,实际开发中可以是 dev、test、demo、production等
  • label: git标签,默认值master
http://blog.csdn.net/liaokailin/article/details/51307215/