解决请求中文乱码(Spring MVC)
1.Get请求乱码(tomcat8.0以后不需要)
在server.xml增加URIEncoding属性
URIEncoding="UTF-8"
tomcat安装目录 --> conf --> server.xml
2.Post请求乱码
在web.xml配置CharacterEncodingFilter
<filter>
<filter-name>characterFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
&