@RefreshScope and /refresh not working

孤街浪徒 提交于 2019-12-03 16:39:25
spencergibb

The endpoint is now /actuator/refresh for Spring 2 and greater

From the comments:

  • You do need to have the management.endpoints.web.exposure.include=refresh set in the bootstrap.properties/bootstrap.yml

Note: If you're new to Spring-Cloud and not quite sure of what all keywords can go in web.exposure you can set it to * (management.endpoints.web.exposure.include=*) to have all exposed and you can get to know the endpoints and their restrictions later.

It worked for me after adding the property "management.endpoints.web.exposure.include=*" in bootstrap.properties and changing the url to /actuator/refresh for spring version above 2.0.0 For spring version 1.0.5 url is /refresh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!