在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> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
天下不负有心人!
原文地址:https://www.cnblogs.com/luckyjiachuixun/p/12368271.html
时间: 2024-10-13 16:51:15