为了账号安全,请及时绑定邮箱和手机立即绑定

自定义log4j配置文件路径后,只能使用文件夹形式(war exploded模式)部署

自定义log4j配置文件路径后,只能使用文件夹形式(war exploded模式)部署

慕工程0101907 2019-03-20 18:15:08
我在web.xml中设置了一个自定义的log4jConfigLocation位置 <!--Log4J配置--><context-param><param-name>webAppRootKey</param-name><param-value>DPCM.root</param-value></context-param><context-param>    <param-name>log4jConfigLocation</param-name>    <param-value>classpath:conf/log/log4j.xml</param-value></context-param><context-param>    <param-name>log4jRefreshInterval</param-name>    <param-value>60000</param-value></context-param><listener>    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class></listener>在Intellij IDEA 中运行 使用war exploded 模式 也就是 使用文件夹方式部署,可以正常启动, 而使用war方式部署,会得到错误提示log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 409 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号