zoukankan      html  css  js  c++  java
  • Hibernate不能实时获取MySQL数据库的更新

    在hibernate.cfg.xml配置文件中,增加以下内容:

    <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
                   <property name="hibernate.c3p0.max_size">20</property>  <!-- 在连接池中可用数据库连接的最大数目-->
                   <property name="hibernate.c3p0.min_size">5</property>  <!-- 在连接池中可用数据库连接的最小数目-->
                   <property name="hibernate.c3p0.max_statements">100</property>
                   <property name="hibernate.c3p0.idle_test_period">120</property>
                   <property name="hibernate.c3p0.acquire_increment">1</property>
                   <property name="c3p0.testConnectionOnCheckout">true</property>
                   <property name="c3p0.idleConnectionTestPeriod">18000</property>
                   <property name="c3p0.maxIdleTime">25000</property>
  • 相关阅读:
    redis-单线程为什么快
    redis-数据结构
    http-状态码
    事件绑定完整版2016/4/21
    焦点事件2016、4、21
    ++
    Bom2016/4/21
    添加以及删除className
    getByClassName2016/4/21
    动态添加
  • 原文地址:https://www.cnblogs.com/lvlv/p/4594764.html
Copyright © 2011-2022 走看看