项目是struts2,spring2.5 用到log4j,启动tomcat时老有警告信息,看着……
警告信息:
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory).
log4j:WARN Please initialize the log4j system properly.
2009-11-26 17:52:54 org.apache.catalina.core.ApplicationContext log
试过很多方法,结果猛一想,是不是因为spring listener加载在log4j前了,结果把顺序换一下就解决了
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>