Files
rikako-note/spring/spring boot/Spring Data.md
2023-01-10 21:59:13 +08:00

9 lines
640 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Spring Data
- ## Spring Boot中选择连接池的算法
- HikariCP的表现和并发性都很好如果HikariCP可以被获取选择HikariCP
- 如果HikariCP不能获取选用Tomcat Datasource
- 如果Tomcat Datasource也不能获取选用DBCP2
- 如果上述都无法获取选用Oracle UCP
- Spring Boot使用自定义连接池
- 可以通过显式指定自定义的连接池种类来绕过该算法通过指定spring.datasource.type来自定义连接池
- 可以通过DatasourceBuilder来定义额外的datasource。如果定义了自己的datasouce bean那么自动装配将不会发生。