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:
Dave Syer
2014-06-10 09:13:19 +01:00
parent 5adbf32c18
commit 36130b27e1
17 changed files with 537 additions and 4 deletions

View File

@@ -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;
}