1.config的配置文件
spring:
application:
name: config
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
cloud:
config:
server:
git:
uri: https://gitee.com/mr_li_yaochu/springcloud-config.git //倉庫地址
search-paths: config //倉庫下的路徑
username: [email protected]
password: lyc102995
label: master
discovery:
enabled: true
server:
port: 8888
management:
endpoints:
web:
exposure:
include: "*" #代表暴露所有端口
cors:
allowed-origins: "*"
allowed-methods: "*"
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/
2.遠端的git的配置
遠端的文件格式命名是
xxx-dev.yml
或者xxx-test.yml
或者xxx-pro.yml
如果要訪問 就是localhost:port/xxx/dev