Giriş
Tomcat connection pool için kullanılır.
Genel
Örnek
Şöyle yaparız.
Örnek
Şöyle yaparız
Örnek
Şöyle yaparız.
Örnek
Şöyle yaparız.
Tomcat connection pool için kullanılır.
Genel
Örnek
Şöyle yaparız.
spring.datasource.driverClassName = org.postgresql.Driver
spring.datasource.url = jdbc:postgresql://xxx.xxx.xxx.xx:5432/mydb
spring.datasource.username = xxxx
spring.datasource.password = xxxx
spring.jpa.properties.hibernate.default_schema=test
# Number of ms to wait before throwing an exception if no connection is available.
spring.datasource.tomcat.max-wait=10000
# Maximum number of active connections that can be allocated from this pool at the
# same time.
spring.datasource.tomcat.max-active=150
spring.datasource.tomcat.max-idle=30
spring.datasource.tomcat.min-idle=2
spring.datasource.tomcat.initial-size=3
# Validate the connection before borrowing it from the pool.
spring.datasource.tomcat.test-on-borrow=true
spring.datasource.tomcat.test-on-connect=true
spring.datasource.time-between-eviction-runs-millis=60000
#spring.datasource.tomcat.validation-query-timeout=1000
spring.datasource.tomcat.validation-query=SELECT 1
spring.datasource.tomcat.validation-interval=1000
spring.datasource.tomcat.remove-abandoned=true
spring.datasource.tomcat.remove-abandoned-timeout=55
spring.datasource.tomcat.test-while-idle=true
spring.datasource.tomcat.min-evictable-idle-time-millis = 55000
spring.datasource.tomcat.time-between-eviction-runs-millis = 34000
initial-size AlanıÖrnek
Şöyle yaparız
spring.datasource.tomcat.initial-size=2
connection-properties AlanıÖrnek
Şöyle yaparız.
spring.datasource.tomcat.connection-properties=useUnicode=true;characterEncoding=utf-8;
max-active Alanı
Örnek
Şöyle yaparız.
Şöyle yaparız.
# Keep the connection alive if idle for a long time (needed in production)
spring.datasource.tomcat.max-active=1
Örnek
Şöyle yaparız
spring.datasource.url=jdbc:mysql://localhost/mydatabase
spring.datasource.username=dbuser
spring.datasource.password=dbpass
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.tomcat.max-active=50
spring.datasource.tomcat.max-idle=10
spring.datasource.tomcat.min-idle=5
spring.datasource.tomcat.test-on-borrow=true
max-wait Alanı
Şöyle yaparız.
spring.datasource.tomcat.max-wait=20000
spring.datasource.tomcat.max-active=50
spring.datasource.tomcat.max-idle=20
spring.datasource.tomcat.min-idle=1
Hiç yorum yok:
Yorum Gönder