2023-09-14
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-paramweb.xml> <init-param> <param-name>isForceResponseEncoding</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>isForceRequestEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
标签:xml,web,springmvc,乱码,true,CharacterEncodingFilter From: https://www.cnblogs.com/isDaHua/p/17703502.html