在Spring的 applicationContext.xml配置文件中如果数据库连接配置中只写jdbc:mysql://localhost:3306/库名的话,会出现在新增数据的时候插入乱码
正确的应该这么写:
jdbc:mysql://localhost:3306/testhospital?useUnicode=true&characterEncoding=gbk
转载于:https://blog.51cto.com/renmeng/910393
在Spring的 applicationContext.xml配置文件中如果数据库连接配置中只写jdbc:mysql://localhost:3306/库名的话,会出现在新增数据的时候插入乱码
正确的应该这么写:
jdbc:mysql://localhost:3306/testhospital?useUnicode=true&characterEncoding=gbk
转载于:https://blog.51cto.com/renmeng/910393