mysql解决方法
vim /etc/my.cnf
[client]
default-character-set=utf8
[mysqld]
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_general_ci
重启: service mysqld restart
mysql>show variables like ‘character_set_%’;
tomcat解决方法
tomcat的 conf/server.xml里加入UTF-8
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>