用Spring初始化Log4J吗?

用Spring初始化Log4J吗?,第1张

用Spring初始化Log4J吗?

你可以在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开始之前就结束了。



欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5014332.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-14
下一篇2022-11-15

发表评论

登录后才能评论

评论列表(0条)

    保存