提交 5f160c17 编写于 作者: J Juergen Hoeller

MBeanExporter logs lazy bean retrieval exceptions on the server at warn level

Issue: SPR-12399
上级 db2601d6
......@@ -1097,6 +1097,19 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
this.objectName = objectName;
}
@Override
public Object getTarget() {
try {
return super.getTarget();
}
catch (RuntimeException ex) {
if (logger.isWarnEnabled()) {
logger.warn("Failed to retrieve target for JMX-exposed bean [" + this.objectName + "]: " + ex);
}
throw ex;
}
}
@Override
protected void postProcessTargetObject(Object targetObject) {
injectNotificationPublisherIfNecessary(targetObject, this.modelMBean, this.objectName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册