DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Spring åº”ç”¨ä¸æ·»åŠ log4j é…ç½®
// description of your code here
<!-- 定义一个key name, 这个key name 在è¿è¡Œæ—¶æŒ‡å‘当å‰web appçš„æ ¹ç›®å½• ---> <context-param> <param-name>webAppRootKey</param-name> <param-value>petstore.root</param-value> </context-param> <!-- 定义一个log4j é…置文件的路径åç§° --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <!-- 使用listener é…ç½® log4j --> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener>




