Name [spring.liveBeansView.mbeanDomain] is not bound in this Context

Name [spring.liveBeansView.mbeanDomain] is not bound in this Context

JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].. Returning null.

错误原因:
spring-context.jar通过jmx来实时查看spring在applicationContext.xml里的bean列表.因为在applicationContext.xml里没有找到”spring.liveBeansView.mbeanDomain”,所以出现异常提示。

解决办法:
在项目中的web.xml中增加以下配置:

<context-param>
  <param-name>spring.profiles.active</param-name>
  <param-value>dev</param-value>
</context-param>
<context-param>
  <param-name>spring.profiles.default</param-name>
  <param-value>dev</param-value>
</context-param>
<context-param>
  <param-name>spring.liveBeansView.mbeanDomain</param-name>
  <param-value>dev</param-value>
</context-param>

 

发表回复

您的电子邮箱地址不会被公开。