New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to opt back in to DataSource auto-configuration when using R2DBC #22094
Comments
If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
I can work on that, but it seems odd that if I change only to spring boot 2.3 it fails to find the bean. We use both R2DBC and JDBC, I only pointed out R2DBC as maybe it was causing a conflict. |
There’s no R2DBC support in Spring Boot 2.2 so switching to 2.3 is more than just a version change. IIRC, the experimental R2DB2 support depended on |
Yea, that's not the issue at all, I believe it has to do with I have this test that passes with bringing it in via |
Thanks for the sample, but it seems to fail with both 2.3.1 and 2.2.8. That's what I would expect as If you can provide a sample that passes with 2.2.x and fails with 2.3.x we can take another look. At the moment it looks to be user error as auto-configuration isn't enabled in |
Hmm, swore I had it failing in |
Once I changed my annotation to I got it to fail in That dependency doesn't exist exactly in for Thanks for the help so far. |
I split the example repo into one that starts with 2.2.8 with R2DBC (still experimental) and swapping it to 2.3.1 will give the error: https://github.com/busches/spring-boot-issue/blob/master/spring-boot-2.2/build.gradle.kts |
Thanks for the sample. I can see what it happening now. As noted in the documentation, the auto-configuration of a If you want to override this opinion and continue to make use of a @SpringBootApplication
@Import(DataSourceAutoConfiguration::class)
class DemoApplication
fun main(args: Array<String>) {
runApplication<DemoApplication>(*args)
} We can use this issue to update the documentation to describe how to opt back in, while also warning about the risks of using JDBC in a reactive application. |
Thanks, that worked! I would have expected this to normally be documented in the release notes, but I'm guessing since r2dbc was experimental before 2.3 it didn't make the cut. And for the record, I agree with why you disabled the JDBC stuff and we only use it in our integration tests similar to my example. :) Thanks again for all your help. |
After upgrading out application from Spring Boot 2.2.8 to 2.3.0 (2.3.1 also fails) we are now getting the following error when running our tests:
Here's a simplistic reproduction example of it failing on 2.3.1 once I add in the r2dbc dependency: https://github.com/busches/spring-boot-issue
The text was updated successfully, but these errors were encountered: