标签:乱码问题 toc 过滤 修改 col web cte ring -name
第一种办法:在web.xml中引入过滤器
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<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>
<servlet>
第二种办法,修改tomcat中server.xml中<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
中加上URIEncoding=“UTF-8”
SpringMVC中如何解决POST请求中文乱码问题GET的又如何处理呢
标签:乱码问题 toc 过滤 修改 col web cte ring -name
原文地址:https://www.cnblogs.com/lquuu/p/14225037.html