繁体   English   中英

yaml 中的 HikariCP 连接泄漏检测

[英]HikariCP connection leak detection in yaml

如果我们需要在 yaml 文件中设置泄漏检测,属性名称是什么? 我在 yaml 中试过这个,这两个似乎都没有被选中。

数据源:驱动程序类名:com.mysql.cj.jdbc.驱动程序 hikari:最大池大小:20 #leakDetection60 秒:600000 #leakDetection60Threshold

您使用 spring 吗? 见这里: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-sql

例子

 spring:
    datasource:
        url: 'jdbc:mysql://localhost/db?useSSL=false'
        username: root
        password: pass
        driver: com.mysql.jdbc.Driver
        hikari:
            minIdle: 10
            leakDetectionThreshold: 60000 
            maximumPoolSize: 30

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM