HikariCP数据库连接池配置 idleTimeout 、maxLifeTime、maximumPoolSize

HikariCP数据库连接池结合Spring配置, 主要参数
idleTimeout 、maxLifeTime、maximumPoolSize


  
<bean id="dataSourceHikari" class="com.zaxxer.hikari.HikariDataSource"  destroy-method="shutdown">  
    
 <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8" />  
 <property name="username" value="${db.username}" />  
 <property name="password" value="${db.password}" />  
    
 <property name="readOnly" value="false" />  
   
 <property name="connectionTimeout" value="30000" />  
   
 <property name="idleTimeout" value="600000" />  
   
 <property name="maxLifetime" value="1800000" />  
   
 <property name="maximumPoolSize" value="15" />  
bean>

你可能感兴趣的:(HiKariCP,数据库连接池,hikariCP,spring,HikariCP)