<bean id= "Data" class= "Org.springframework.jdbc.datasource.DriverManagerDataSource" > <property name= "Driverclassname" value= "Com.mysql.jdbc.Driver"/>
<span style= "White-space:pre" ></span>//if you want to support Chinese, you should add <span style= "font-family:arial after the table name, Helvetica, Sans-serif; " >?useUnicode=true&characterEncoding=UTF-8</span>
<span style= "font-family:arial, Helvetica, Sans-serif;" ><span style= "White-space:pre" ></span>//note here the & character, can not write directly, write the words will be error, must be escaped, escaped for &</span >
<property name= "url" value= "Jdbc:mysql://localhost:3306/test?useunicode=true&characterencoding=utf-8"/ > <property name= "username" value= "root"/> <property name= "password" value= "/> </ Bean>
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Spring+mysql Chinese Characters