Hibernate插入数据库中文乱码

    xiaoxiao2021-03-26  25

    数据库编码: GB2312

    项目编码: UTF-8

    解决乱码:

    在hibernate.cfg.xml配置文件中配置:

    <property name="hibernate.connection.url">

    jdbc:mysql://localhost:3306/itcast0201crm?useUnicode=true&characterEncoding=UTF-8

    </property>

    转载请注明原文地址: https://ju.6miu.com/read-650375.html

    最新回复(0)