问题栏

用户名:xg01

悬赏金:40鼠币

tomcat 下多个 war 包部署引发 log 4j 组件异常

omcat 下多个 war 包部署引发 log 4j 组件异常,怎么解决呢?
异常信息为:

severe: exception sending context initialized event to listener instance of class [org.springframework.web.util.Log4jConfigListener]
java.lang.IllegalStateException: web app root system property already set to different value: 'webapp.root' = [/opt/apache-tomcat-8.5.20/webapps/appmonitor/] instead of [/opt/apache-tomcat-8.5.20/webapps/natquery/] - choose unique values for the 'webapprootkey' context-param in your web.xml files!
at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:162)
at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:119)

发布时间:2019-05-08
解答栏
  • 用户名:MASHEN

    为每个应用单点加上配置:
    <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>xxx.root</param-value>
    </context-param>

    发布时间:2019-05-08



撰写答案
请登录后再回答