当我在web.xml中配置了编码过滤器后还是不能解决url传参乱码的情况。
后来才知道在tomcat插件中也需要配置编码:如下
<plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <configuration> <path>/</path> <port>9998</port> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins>
这样便完美解决了我的问题!
原文:https://www.cnblogs.com/dayu007/p/10115362.html