To check your filter configuration are configured with a highest priority filter, the highest priority filter will affect CharacterEncodingFilter springboot configured automatically. For the following reasons:
In the tomcat:
-
parameter request object not start parsing, and so it is the first time you call
getParameter*
time and other parameters related to the request for obtaining the only resolution -
Once paramter is resolved once, it will not be parsed again
So if CharacterEncodingFilter
there is another filter before, and this filter calls the getParameter*
method, then it is possible to resolve using the wrong encoding, resulting in garbled.
Methods: change the priority of your own filter configuration, at least a lower priority than the CharacterEncodingFilter.