zoukankan      html  css  js  c++  java
  • hibernate的数据库乱码问题

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                             "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
     <session-factory name="">
      <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
      <!-- 解决中文乱码问题:使用"?useUnicode=true&amp;characterEncoding=UTF-8",不可分行书写 -->
      <property name="hibernate.connection.url">
       jdbc:mysql://localhost:3306/pf?useUnicode=true&amp;characterEncoding=UTF-8
      </property>
      <property name="hibernate.connection.username">opfo</property>
      <property name="hibernate.connection.password">opfo.cn</property>
      <property name="hibernate.connection.pool_size">5</property>
      <property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
      <property name="hbm2ddl.auto">update</property>
      <property name="show_sql">true</property>
      <property name="hibernate.show_sql">true</property>
      <mapping resource="cn/opfo/app/domain/Person.hbm.xml" />
     </session-factory>
    </hibernate-configuration>

  • 相关阅读:
    64位机配置iis 运行asp.net 程序(转载)
    病狗问题
    如何配置sqlcachedependence
    操作应用程序池
    自定义事件
    以下事情没做好决不能给客户演示
    判断用户ip是否在指定的ip段内
    silverlight4学习中解决的问题
    日历JS代码
    自己写的代码生成器ltscode2.0
  • 原文地址:https://www.cnblogs.com/flycatnet/p/5161573.html
Copyright © 2011-2022 走看看