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>

  • 相关阅读:
    Button与ImageButton的区别
    TCP、HTTP、Socket
    ASPX开发基础
    WebForm复杂控件
    Webform 内置对象 Session对象、Application全局对象,ViewState
    JavaScript
    .net
    postman-学习笔记
    2021第一天上班,立个flag
    js函数累加
  • 原文地址:https://www.cnblogs.com/flycatnet/p/5161573.html
Copyright © 2011-2022 走看看