在Spring Cloud建立[Config Client]專案或模組時
需要選擇以下的選項,
![](https://img.haomeiwen.com/i4802728/be4c2747b5683c09.png)
![](https://img.haomeiwen.com/i4802728/0cb3b2e59dfc4a15.png)
![](https://img.haomeiwen.com/i4802728/6145f4705faebcc8.png)
org.springframework.boot spring-boot-starter-actuator
勿選成
org.springframework.cloud spring-cloud-starter-actuator
會造成服務啟不起來
![](https://img.haomeiwen.com/i4802728/0a808809ef6be0a8.png)
只需如此
![](https://img.haomeiwen.com/i4802728/74b0d5bd8aeae226.png)
需加上@RefreshScope不然若Config Server更新後的Refresh不會生效
在Spring Cloud建立[Config Client]專案或模組時
需要選擇以下的選項,
org.springframework.boot spring-boot-starter-actuator
勿選成
org.springframework.cloud spring-cloud-starter-actuator
會造成服務啟不起來
只需如此
需加上@RefreshScope不然若Config Server更新後的Refresh不會生效
本文标题:【Spring Cloud】從IDEA建立config clie
本文链接:https://www.haomeiwen.com/subject/prujdftx.html
网友评论