通过最下面一项和配置,当链接池泄露后后台会打印日志
#pgsql
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
username: xxxx
password: xxxxx
url: jdbc:postgresql://xxxxxx:15453/database?currentSchema=public&reWriteBatchedInserts=true&stringtype=unspecified
hikari:
maximum-pool-size: 30 # 设置最大连接数
minimum-idle: 10 # 设置最小空闲连接数
connection-timeout: 30000 # 连接超时时间
idle-timeout: 600000 # 空闲超时时间
max-lifetime: 1800000 # 连接存活时间
leak-detection-threshold: 600000 # 连接泄露检测的阈值(毫秒)
logging:
level:
io.minio: debug
#com.jurassic.cloud.assets: debug
org.springframework.data.mongodb: debug
com.mongodb: debug
com.zaxxer.hikari: debug