28 Eylül 2022 Çarşamba

SpringBoot spring.datasource Dbcp2 Ayarları

Örnek
Şöyle yaparız
spring:
datasource:
  url : jdbc:mariadb://{DB Path}?autoReconnect=true
  hikari:
    # on Connection Time
    max-lifetime: 40000
    read-only: false
    connection-timeout: 9000
    # Max DB Connection Pool Size : 8
    maximum-pool-size: 8
    # Test Sql Connection
    connection-init-sql: SELECT 1
    # Default Connection Size : 4
    minimum-idle: 4
  dbcp2:
    # send something when Start Web
    test-on-borrow: true
    # something
    validation-query: SELECT 1
    # Test Sql
    test-while-idle: true


Hiç yorum yok:

Yorum Gönder