Improve support for jOOQ 3.15 by making R2dbcAutoConfiguration back off in the absence of a connection provider
See original GitHub issueStarting with jOOQ 3.15 (hopefully due by the end of Q2 2021), jOOQ will support R2DBC: https://github.com/jOOQ/jOOQ/issues/11700. For this, there is an io.r2dbc:r2dbc-spi
dependency from org.jooq:jooq
in all distributions. Just like with JDBC, the R2DBC drivers, connection pools, etc. will be provided and configured by users.
This now means that R2dbcAutoConfiguration
will be activated and lead to false positive exceptions in 95% of all cases, because most people will still want to use the DataSourceAutoConfiguration
.
A special case is when someone already excludes the DataSourceAutoConfiguration
because they want to configure their own DataSource
, or use DriverManager
:
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
In that case, they will have to also exclude R2dbcAutoConfiguration
when they upgrade to jOOQ 3.15.0:
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, R2dbcAutoConfiguration.class })
Not being a Spring Boot guru myself, I still wonder how we can prepare jOOQ + Spring Boot optimally to prevent any frustration from users when things break after the jOOQ 3.15 upgrade, keeping in mind:
- Most people probably use jOOQ with a
DataSourceAutoConfiguration
and don’t care about R2DBC - Some people will want to use jOOQ with R2DBC exclusively, and not use a JDBC
DataSource
- Some people will want to use jOOQ with both JDBC and R2DBC
- Some people opt out of both of these auto configurations
Ideas?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:29 (26 by maintainers)
For the record, I can confirm this issue disappears after upgrading to Spring Boot 2.6, great job everyone 💪
I’ve opened https://github.com/spring-projects/spring-boot/issues/28378 to see if we can improve the error message when there’s no
DSLContext
bean. This’ll still apply even with the changes proposed in this issue, it’ll just be less likely to occur.