[英]Default connection pool for tomcat in spring-boot?
使用spring-boot
進行tomcat
連接池的postgres
數據庫上最大連接的默認值是多少?
有一個屬性spring.datasource.maxActive
,但是當我嘗試sysout它時,我得到一個異常:
@Value("${spring.datasource.maxActive}")
private String act;
java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.maxActive' in string value "${spring.datasource.maxActive}
根據org.apache.tomcat.jdbc.pool.PoolProperties
,默認值為100
您需要在application.properties或application.yaml中設置spring.datasource.max-active以獲取bean類中的值
有關常見的application.properties,請參閱https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.