SSH--Hibernate传值为乱码 || 显示为乱码

来源:互联网 发布:公司seo是什么职位 编辑:程序博客网 时间:2024/06/01 13:50

1.MySQL数据库编码设为UTF-8



2.Myeclipse编码格式

右键项目→PropertiesResource



3.Hibernate配置文件.xml

<property name="url"   value="jdbc:mysql://localhost:3306/aimage?useUnicode=true&characterEncoding=utf8"></property>

数据库名称?useUnicode=true&amp;characterEncoding=utf8

(有些是"&"不能用的)

0 0
原创粉丝点击