28 Ocak 2021 Perşembe

SpringData R2DBC application.properties

Giriş
Açıklaması şöyle
The critical properties are spring.r2dbc.url and spring.r2dbc.username and spring.r2dbc.password

The standard spring.datasource.* properties are not relevant for R2DBC.
Örnek - mysql
Şöyle yaparız
spring.r2dbc.url=r2dbc:pool:mysql://localhost:3306/SQL_RX_TEST?
  zeroDateTimeBehavior=convertToNull&useSSL=false&useServerPrepareStatement=true
Örnek  postgre
Şöyle yaparız
spring.r2dbc.url=r2dbc:postgresql://postgres@localhost:5432/reactive
logging.level.org.springframework.r2dbc=DEBUG
Örnek - loglama
Şöyle yaparız
# I can enable logging using application.properties to see the executed queries— handy.

logging.level.org.springframework.data.repository=DEBUG
logging.level.org.springframework.r2dbc.core=DEBUG


Hiç yorum yok:

Yorum Gönder