wangwy
wangwy

Reputation: 21

How to Refresh Spring Boot Configuration Info with Using Spring Cloud Config

I would like to ask how to refresh spring boot configuration info with using spring cloud config. Would you please give me some advice? Many thanks.

Upvotes: 1

Views: 697

Answers (1)

Valerio Vaudi
Valerio Vaudi

Reputation: 4532

If your spring boot application is a client of Spring Cloud Configuration Server and use itself as single point of truth in the application configuration let's say retrieve application.properties/yml from the config server, you can benefit of @RefreshScope. in this case if you do a post to the /refresh if you use spring boot 1.x or /actuator/refresh if you use spring boot 2.x all the bean that are have are annotated as @RefreshScope will be refreshed.

Upvotes: 1

Related Questions