I'm using URL connection with application.yml file for my r2dbc connection.
I tried to set connectTimeout
property but got this error:
Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.time.Duration (java.lang.String and java.time.Duration are in module java.base of loader 'bootstrap')
and I checked that r2dbc-spi configured the type of connectTimeout
as java.time.Duration
. And r2dbc-mysql
, which I'm using follows it.
Can I use connectTimeout property with URL way? I have no idea how to automatically transfer it from string to java.time.Duration
.
So far, I saw most type of connection property values are string, integer, boolean. And as I know, JDBC configured unit of connectTimeout
as ms
so I could easily set connectTimeout
with URL. Is there any reason that r2dbc-spi choosed Duration
type for it?