在Spring Cloud建立[Config Client]專案或模組時
需要選擇以下的選項,
web
actuator
config client
org.springframework.boot spring-boot-starter-actuator
勿選成
org.springframework.cloud spring-cloud-starter-actuator
會造成服務(wù)啟不起來
SpringBootApplication
只需如此
Controller
需加上@RefreshScope不然若Config Server更新後的Refresh不會生效