Spring-Boot: How do I set JDBC pool properties like maximum number of connections?

后端 未结 5 811
北荒
北荒 2020-11-28 02:26

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

5条回答
  •  庸人自扰
    2020-11-28 03:00

    Based on your application type/size/load/no. of users ..etc - u can keep following as your production properties

    spring.datasource.tomcat.initial-size=50
    spring.datasource.tomcat.max-wait=20000
    spring.datasource.tomcat.max-active=300
    spring.datasource.tomcat.max-idle=150
    spring.datasource.tomcat.min-idle=8
    spring.datasource.tomcat.default-auto-commit=true
    

提交回复
热议问题