Spring-Boot is a pretty awesome tool, but the documentation is a bit sparse when it comes to more advanced configuration. How can I set properties like the maximum size for
For example Tomcat (default) expects:
spring.datasource.ourdb.url=...
and HikariCP will be happy with:
spring.datasource.ourdb.jdbc-url=...
We can satisfy both without boilerplate configuration:
spring.datasource.ourdb.jdbc-url=${spring.datasource.ourdb.url}
Take a look at source DataSourceBuilder.java
If Tomcat, HikariCP or Commons DBCP are on the classpath one of them will be selected (in that order with Tomcat first).
... so, we can easily replace connection pool provider using this maven configuration (pom.xml):
org.springframework.boot
spring-boot-starter-jdbc
org.apache.tomcat
tomcat-jdbc
com.zaxxer
HikariCP