Support for Jmx (and Integration) autoconfig in parent contexts
When there are parent contexts we already had a strategy for registering the actuator endpoints, but not the regular JMX or Integration MBeans. This chnage makes the autoconfigs for JMX aware of the parent context. Also adds a sample with a parent context. See gh-847
This commit is contained in:
@@ -17,12 +17,16 @@
|
||||
package sample.integration;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.jmx.export.annotation.ManagedAttribute;
|
||||
import org.springframework.jmx.export.annotation.ManagedResource;
|
||||
|
||||
@ConfigurationProperties(prefix = "service", ignoreUnknownFields = false)
|
||||
@ManagedResource
|
||||
public class ServiceProperties {
|
||||
|
||||
private String greeting = "Hello";
|
||||
|
||||
@ManagedAttribute
|
||||
public String getGreeting() {
|
||||
return this.greeting;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user