SpringCloud (3) Config unified configuration center

config will pull the configuration file from git to the local, and then read the local file

eureka: 
  client: 
    service-url: 
      #Register 
      server address defaultZone: http: // localhost: 8761 / eureka 
spring: 
  application: 
    name: config 
  cloud: 
    config: 
      server: 
        git: #Configuration 
          file git address uri: https: // gitee.com/yejiaomin/config-repo #git 
          username 
          password: username: xxxx password: yyyyy 
          #git file save local address 
          basedir: D: \ 2.workspace \ config \ basedir
          
          

 

1. Read the configuration file format

/{name}-{profiles}.yml

/{label}/{name}-{profiles}.yml

name service name, profiles: environment, label: branch

http://localhost:8080/release/order-dev.yml

Guess you like

Origin www.cnblogs.com/t96fxi/p/12694307.html
Recommended