Open kwonglau opened 1 year ago
Perhaps the solution is for mysqlConnectionFactory()
to use a plugin mechanism, e.g. Java SPI, i.e. find/load a Spring Boot version specific factory class for ConnectionFactory
.
because of the SPI version different. We need to use different version of the r2dbc version when using different spring boot version e.g.
Postgres 1.0.0.RELEASE for SB3 and 0.9.3.RELEASE for SB2 Mariadb 1.1.2.RELEASE for SB3 and 1.0.2 for SB2
how do we deal with different version of the dependencies ?
how do we deal with different version of the dependencies ?
I don't know the details but I'm guessing something like this:
eventuate-common-spring-<bootversion>-reactive...
and/or r2dbc libraryeventuate-common-spring-<bootversion>-reactive...
eventuate-common-spring-reactive-...
modules too, ie. code that uses SPIs that can be compiled with the older version but can run with the newer version.MariadbConnectionConfiguration conf = MariadbConnectionConfiguration.builder()
@kwonglau Why is a MariaDB specific API needed instead of a generic ConnectionFactoryOptions
?
thanks for the idea. I'll try and see if this approach works.
r2dbc has change the return type for insert row count from int to long. when using spring boot 3, we need to update the code and at least re-compile.
@kwonglau Where does this change need to be made?
because .option(Option.valueOf("allowPublicKeyRetrieval"), true) doesn't work since allowPublicKeyRetrieval is not a configuration param for mariadb. it can only be configured using the api explicitly.
thanks for the idea. I'll try and see if this approach works.
BTW My preference would be to get the non-reactive Eventuate working with a Spring Boot 3 application before worrying about the reactive APIs. See comment about how the Eventuate libraries should be built/tested with Spring Boot 2 but work in a Spring Boot application.
will do
Spring Boot 2 is using R2DBC SPI 0.8.x Spring Boot 3 is using 1.0.0.RELEASE
r2dbc has change the return type for insert row count from int to long. when using spring boot 3, we need to update the code and at least re-compile.
https://github.com/mirromutth/r2dbc-mysql the mysql r2dbc driver is not compatible with spring boot 3 and I mange to use the mariadb r2dbc driver (1.1.2) connecting to mysql server 8.0.31 and it is working well. when using 1.1.3, it throw exception, but 1.1.3 version can connect to mariadb 10.10.2 without any error.
However, the code need to be update like the following.