在 web.xmml中添加下面的代码
<!--解决提交后乱码问题--> <filter> <filter-name>encoding</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> </filter> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>*.html</url-pattern> </filter-mapping>
原文地址:https://www.cnblogs.com/xiguocun/p/9833202.html
时间: 2024-10-13 15:16:06