你可以在web.xml而不是spring-context.xml中配置Log4j侦听器
<context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.web.properties</param-value></context-param><listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class></listener>
因此,在Spring开始之前就结束了。



