spring学习之三

作开发的应该注意到Log4jConfigServlet,供配置spring应用的日志使用,其使用方法同ContextLoaderServlet.web

好比:在web中配置spring

  <!-- Log4j -->
  <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:/log4j.properties</param-value>
  </context-param>
ide

加上spa

<servlet>
  <servlet-name>lo4jConfigServlet</servlet-name>
  <servlet-class>org.springframework.web.util.Lo4jConfigServlet></servlet-class>
  </servlet>
日志

或者orm

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>开发

相关文章
相关标签/搜索