Spring 配置了log4g遇到的问题

飞飞行行 发布于 2015/06/04 17:03
阅读 3K+
收藏 0
java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [/log4j.properties] cannot be resolved to absolute file path because it does not exist

at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:155)

请问出现这样的错误是什么原因呢?

加载中
0
飞飞行行
飞飞行行
下面是web.xml中配置log4g
<context-param> 
<param-name>log4jConfigLocation</param-name> 
<!--<param-value>/WEB-INF/classes/log4j.properties</param-value>-->  
<param-value>classpath:/log4j.properties</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>
返回顶部
顶部