web.xml file with the following code
<-! post request interceptor distortion ->
<filter>
<filter-name> CharacterEncodingFilter </ filter-name>
<filter-class> org.springframework.web.filter.CharacterEncodingFilter < / filter-class>
<the init-param>
<param-name> encoding </ param-name>
<param-value> UTF-. 8 </ param-value>
</ the init-param>
</ filter>
<filter-Mapping >
<filter-name> CharacterEncodingFilter </ filter-name>
<URL-pattern> / * </ URL-pattern>
</ filter-Mapping>
disadvantages: the rear end of the string can not be transferred directly to the front end of Chinese, Chinese distortion or display, only packaged into json format to ensure the Chinese normal, because no need, this shortcoming will be tasteless
spring controller web front post acquisition data garbled solve
Guess you like
Origin www.cnblogs.com/c2g5201314/p/11601292.html
Recommended
Ranking