使用Spring 4.2.5.RELEASE版本,采用0 xml文件配置。
需要在配置类中加入字符编码过滤器:
public class AppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Filter[]
getServletFilters() {
CharacterEncodingFilter filter =
new CharacterEncodingFilter(
"UTF-8",
true);
return new Filter[] { filter };
}
}
转载请注明原文地址: https://ju.6miu.com/read-200079.html