需要在web.xml配置文件中配置一个字符集的过滤器 spring自带的 [html] view plain copy <span style="white-space:pre"> </span><filter> <filter-name>utf</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>utf</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 在tomcat的server.xml端口哪里加上URIEncoding="utf-8"这句