mysql的数据库属性,字符集为utf8 -- UTF-8 Unicode,排序规则为utf8_general_ci,struts提交中文无乱码,只需在spring配置文件,datasource加上 <property name="url" value="jdbc:mysql://127.0.0.1:3306/kh?useUnicode=true&characterEncoding=UTF-8">
就可以了
转载于:https://my.oschina.net/u/255939/blog/402885