5.数据库连接池
目前用的最多的是 Druid
最新出的是 HikarCP 据说性能最好的
spring.profiles: test
spring:
datasource:
name: ncamcdb
url: jdbc:oracle:thin:@x.x.x.x:1521/orcl #数据库连接
username: #用户名
password: #密码
# 使用druid数据源
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: oracle.jdbc.OracleDriver
druid:
filters: stat
min-evictable-idle-time-millis: 300000
time-between-eviction-runs-millis: 60000
max-active: 10
max-wait: 60000
min-idle: 1
keep-alive: true
remove-abandoned: true
max-open-prepared-statements: 20
pool-prepared-statements: true
validation-query: select 'x' FROM DUAL
test-on-return: false
test-on-borrow: true
test-while-idle: true
initial-size: 1