Default connection pool for tomcat in spring-boot?
Solution 1
According to org.apache.tomcat.jdbc.pool.PoolProperties
the default value is 100
Solution 2
You need to set spring.datasource.max-active in your application.properties or application.yaml to get the value in your bean class
Refer https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html for common application.properties
membersound
JEE + Frameworks like Spring, Hibernate, JSF, GWT, Vaadin, SOAP, REST.
Updated on September 16, 2020Comments
-
membersound over 3 years
What is the default value used for maximum connections on a
postgres
database withtomcat
connection pooling usingspring-boot
?There is a property
spring.datasource.maxActive
, but when I try to sysout it, I'm getting an exception:@Value("${spring.datasource.maxActive}") private String act;
java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.maxActive' in string value "${spring.datasource.maxActive}