由于
编码的不一致,我们可以在web.xml中配置spring的中文过滤器
<!-- spring character filter -->
<filter>
<filter-name>encodingfilter</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>encodingfilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>