|
dataSource=com.alibaba.druid.pool.DruidDataSource
#数据库连接地址、名称、密码
dataSource.url=jdbc:postgresql://121.42.53.174:5432/ekexiu
dataSource.username=postgres
dataSource.password=postgres
#连接池启动时的初始值(初始化连接)
dataSource.initialSize::int=1
#最小空闲连接值
dataSource.minIdle::int=1
#连接池的最大值(最大连接数量)
dataSource.maxActive::int=1
#超时等待时间(maxWait代表当Connection用尽了,多久之后进行回收丢失连接)
dataSource.maxWait::long=60000
#连接超时任务的时间间隔
dataSource.timeBetweenEvictionRunsMillis::long=60000
#连接的超时时间
dataSource.minEvictableIdleTimeMillis::long=300000
#用来验证从连接池取出的连接
dataSource.validationQuery=SELECT 1
#指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败则连接将被从池中去除
dataSource.testWhileIdle::boolean=true
#在从池中取出连接前进行检验,如果检验失败则从池中去除连接并尝试取出另一个
dataSource.testOnBorrow::boolean=true
#指明是否在归还到池中前进行检验
dataSource.testOnReturn::boolean=true
#开启池的prepared statement 池功能
dataSource.poolPreparedStatements::boolean=true
#statement池能够同时分配的打开的statements的最大数量
dataSource.maxPoolPreparedStatementPerConnectionSize::int=20
#默认的SQL语句自动提交状态(开启或关闭)设置由连接池本身设置(false由连接池定)
dataSource.defaultAutoCommit::boolean=false
|