• hibernate配置文件


    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE hibernate-configuration PUBLIC
            "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
            "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory>
            <property name="connection.username"> root</property>
            <property name="connection.password"> 123456</property>
            <property
                    name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
            <property name="connection.url">jdbc:mysql://localhost:3306/hibernate?
                useUnicode=true&amp;characterEncoding=UTF-8</property>
            <!-- C3P0 -->
            <property name="hibernate.c3p0.acquire_increment">10</property>
            <property name="hibernate.c3p0.idle_test_period">10000</property>
            <property name="hibernate.c3p0.timeout">5000</property>
            <property name="hibernate.c3p0.max_size">30</property>
            <property name="hibernate.c3p0.min_size">5</property>
            <property name="hibernate.c3p0.max_statements">10</property>
            <!-- 数据库⽅⾔ -->
            <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
            <!-- 打印SQL -->
            <property name="show_sql">true</property>
            <!-- 格式化SQL -->
            <property name="format_sql">true</property>
            <!-- 是否⾃动⽣成数据库 -->
            <property name="hibernate.hbm2ddl.auto"></property>
        </session-factory>
    </hibernate-configuration>
    不经一番彻骨寒,哪有梅花扑鼻香?
  • 相关阅读:
    关于BlockingQueue
    关于java的线程
    mongodb的锁和高并发
    innodb的锁和高并发
    mysql的事务隔离级别及其使用场景
    mongodb分页
    ReentrantLock和Synchronized
    spring boot MVC
    svn 入门
    多线程的返回值等问题
  • 原文地址:https://www.cnblogs.com/zongyao/p/13831092.html
Copyright © 2020-2023  润新知