1:RequestBody返回中文亂碼解決方案
<!-- 啓用 Annotation 驅動 -->
<mvc:annotation-driven>
<mvc:message-converters register-defaults="true">
<!-- 解決RequestBody返回中文亂碼 -->
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/plain;charset=UTF-8</value>
<value>text/html;charset=UTF-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
2.解決GET請求發送請求參數中文亂碼解決方案
tomcat的server.xml文件,Connector標籤增加useBodyEncodingForURI="true"屬性即可。