Spring resolve post request and get requests Chinese garbled
If the request is garbled post:
Join springMvc support in the web.xml file filter
<!--配置中文编码过滤器,放到springmvc前端控制器上面-->
<filter>
<filter-name>characterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<!--配置当前编码过滤器的指定编码为UTF-8-->
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<!--强制将当前工程的请求和响应编码设置为utf-8-->
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern> / * </url-pattern>
</filter-mapping>
If the request is get garbled:
Find server.xml file is compiled under the Tomcat conf file,
add here URIEncoding = "UTF-8". On it