1,在navicat 里 F6 进入mysql命令操作
mysql> alter table content modify author varchar(30) character set gbk;
2,在hibernate .cfg.xml中设置url为这样
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/数据库名?characterEncoding=gbk</property>
1,在navicat 里 F6 进入mysql命令操作
mysql> alter table content modify author varchar(30) character set gbk;
2,在hibernate .cfg.xml中设置url为这样
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/数据库名?characterEncoding=gbk</property>