赞
踩
jdbcUrl=jdbc:mysql://localhost:3306/test
username=test
password=123456
maximumPoolSize=30
minimumIdle=5
connectionTestQuery=SELECT 1
autoCommit=true
dataSource.cachePrepStmts=true
dataSource.prepStmtCacheSize=250
dataSource.prepStmtCacheSqlLimit=2048
dataSource.useServerPrepStmts=true
dataSource.useLocalSessionState=true
dataSource.useLocalTransactionState=true
dataSource.rewriteBatchedStatements=true
dataSource.cacheResultSetMetadata=true
dataSource.cacheServerConfiguration=true
dataSource.elideSetAutoCommits=true
dataSource.maintainTimeStats=false
HikariConfig config = new HikariConfig("src/hikari.properties");
System.out.println(config.getJdbcUrl());
System.out.println(config.getConnectionTimeout());
System.out.println(config.getMaximumPoolSize());
System.out.println(config.getMinimumIdle());
System.out.println(config.getUsername());
System.out.println(config.getPassword());
HikariDataSource ds = new HikariDataSource(config);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。