25
2020
05

log4j:WARN No appenders could be found for logger (org.springframework.test.context.junit4.SpringJUn

SSM整合,在进行单元测试时,会报下面的警告。

log4j:WARN No appenders could be found for logger (org.springframework.test.context.junit4.SpringJUnit4ClassRunner).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

23
2020
05

SSM框架 HttpPutFormContentFilter 过期解决方法

HttpPutFormContentFilter过滤器会自动的封装前台传递过来的PUT请求的参数,如果不配置HttpPutFormContentFilter过滤器的话,那么tomcat便不会自主的分封装PUT请求的参数。

<filter>
  <filter-name>
HttpPutFormContentFilter
</filter-name>
  <filter-class>
org.springframework.web.filter.HttpPutFormContentFilter
</filter-class>
</filter>
<filter-mapping>
  <filter-name>
HttpPutFormContentFilter
</filter-name>
  <url-pattern>
/*
</url-pattern>
</filter-mapping>

但现在官方已经不再推荐使用该配置。

«1»