Commit 36c1db02 authored by Phillip Webb's avatar Phillip Webb

Merge branch '1.5.x'

parents 1709a3ad 21234b36
...@@ -283,13 +283,15 @@ public class EndpointMBeanExporter extends MBeanExporter ...@@ -283,13 +283,15 @@ public class EndpointMBeanExporter extends MBeanExporter
String beanKey) { String beanKey) {
if (applicationContext.getParent() != null) { if (applicationContext.getParent() != null) {
try { try {
this.applicationContext.getParent().getBean(beanKey, Endpoint.class); Object bean = this.applicationContext.getParent().getBean(beanKey);
return true; if (bean instanceof Endpoint || bean instanceof JmxEndpoint) {
return true;
}
} }
catch (BeansException ex) { catch (BeansException ex) {
return parentContextContainsSameBean(applicationContext.getParent(), // Ignore and continue
beanKey);
} }
return parentContextContainsSameBean(applicationContext.getParent(), beanKey);
} }
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment