zoukankan      html  css  js  c++  java
  • spring启动找不到spring.liveBeansView.mbeanDomain配置

    做项目时,启动tomcat报错

    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里的bean列表功能,会在项目配置文件里找一个叫"spring.liveBeansView.mbeanDomain"的环境变量,没找到,就报错了。

    解决办法就是在项目中的web.xml中添加如下配置:

     1 <context-param>
     2   <param-name>spring.profiles.active</param-name>
     3   <param-value>dev</param-value>
     4  </context-param>
     5  <context-param>
     6   <param-name>spring.profiles.default</param-name>
     7   <param-value>dev</param-value>
     8  </context-param>
     9  <context-param>
    10   <param-name>spring.liveBeansView.mbeanDomain</param-name>
    11   <param-value>dev</param-value>
    12  </context-param>
  • 相关阅读:
    棋盘问题 简单搜索DFS
    Equivalent Strings
    素数环
    LeetCode Maximum Product Subarray
    UVA 725 – Division
    矩形嵌套问题
    ACM最大子串和问题
    ACM装箱问题
    ACM田胫赛马
    ACM雷达安放问题
  • 原文地址:https://www.cnblogs.com/SmallStrange/p/9606706.html
Copyright © 2011-2022 走看看