Skip to main content
 首页 » 编程设计

SpringBoot如何使用HikariCP连接池详解

2022年07月18日30jpfss

参考:https://www.jb51.net/article/157642.htm

https://www.cnblogs.com/yydxxg/p/14995554.html

https://blog.csdn.net/john1337/article/details/105481143/

https://blog.csdn.net/hzbooks/article/details/108215836

https://lequ7.com/guan-yu-javahikari-lian-jie-chi-shi-yong-springboot-pei-zhi-jmx-jian-kong.html

实例:

在springBoot applicationBootstrap 加注解:

@ConfigurationProperties(prefix = "spring.datasource.hikari")


application.yaml加:
spring:
datasource:
hikari:
auto-commit: false
transaction-isolation: TRANSACTION_READ_COMMITTED
maximum-pool-size: 200

management:
endpoint:
prometheus:
enabled: true
endpoints:
web:
exposure:
include: health,info,metrics,prometheus,offline

访问: http://localhost:18000/actuator/prometheus


本文参考链接:https://www.cnblogs.com/maohuidong/p/15412082.html