-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.
I have put together a few MvcEndpoints of my own in one small @Configuration class, based on Spring Boot 1.5.1.RELEASE, Java 8, Tomcat 8.5.11.
@Bean
@RefreshScope
public MvcEndpoint myVeryNiceEndpoint() {
return new VeryNiceEndpoint(...);
}Such endpoints are all children of AbstractNamedMvcEndpoint and via my own properties are appropriately marked as enabled and/or sensitive. Life is good.
Now, (and I don't know if this request belong to the Spring Cloud project or Spring Boot, so apologies beforehand if this is misplaced, but) if I change a property that affects the sensitivity of an endpoint (say my.endpoint.sensitive=false where the default was/is true) and I actually "refresh" the context in Spring Cloud terms, I can see that:
- The property changes are properly picked up in the logs.
- In the code I can see the associated components properly pick up the change in values.
However, VeryNiceEndpoint is not refreshed. I can see that Spring Cloud is doing everything it's supposed to do to pick up changes and refresh the context, etc and the application context is properly refreshed. But for some reason, MvcEndpoints are not refreshed and picked up. And this is still true w.r.t to Spring Boot's own actuator endpoints. Regardless of what changes are done to the underlying setting in my case, access to that endpoint, albeit a very nice one, is still blocked until I restart the application.
Bug? Feature enhancement?