@RefreshScope and /refresh not working

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


For YAML files, the property's value needs to be wrapped inside double quotes :

# Spring Boot Actuator
management:
  endpoints:
    web:
      exposure:
        include: "*"

Note : Ensure you use the right endpoints keyword (with 's') for this property as long as it exists for another property without 's' : "management.endpoint.health.... " .


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.