1.使用congitServer管理配置文件,client如何動態刷新配置文件
bootstrap.properties
#允許刷新
management.endpoints.web.exposure.include=refresh
類增加標籤
@RefreshScope
修改完配置文件後,調用:
http://localhost:8772/actuator/refresh
2.client如何加載多個文件
使用逗號
spring.cloud.config.name=email,we_chat