SSM框架中配置pom中tomcat,解决中文传参数乱码的方法。
默认情况下,tomcat使用的是iso8859-1的编码编码方式,修改Tomcat默认编码为UTF-8就能支持中文。
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<server>tomcat7</server>
<path>/</path>
<port>8005</port>
<uriEncoding>UTF-8</uriEncoding>
<update>true</update>
</configuration>
</plugin>