Spring Cloud系統——問題解決

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章