通过过滤器统一请求与响应的编码格式:
<!--字符编码过滤器--> <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>/*</url-pattern> </filter-mapping>
标签:编码,utf,encoding,SpringMVC,springframework,过滤器 From: https://www.cnblogs.com/lurenjia-bky/p/17175687.html