Skip to content
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

Spring Data R2DBC sample broke with upgrade to Spring Boot 2.5.1 #404

Closed
elefeint opened this issue Jul 9, 2021 · 0 comments · Fixed by #405
Closed

Spring Data R2DBC sample broke with upgrade to Spring Boot 2.5.1 #404

elefeint opened this issue Jul 9, 2021 · 0 comments · Fixed by #405
Assignees
Labels

Comments

@elefeint
Copy link
Contributor

elefeint commented Jul 9, 2021

In SpringDataR2dbcApp, the Spring Data sample programmatically instantiates a ConnectionFactory object. This used to work, with Spring Boot creating DatabaseClient and repository objects based on the application-provided ConnectionFactory.

However, after upgrade to Spring Boot 2.5.1, the sample failed to start at autoconfiguration with Caused by: java.lang.IllegalArgumentException: Cannot determine database's type as ConnectionFactory is not options-capable. This issue goes away in Spring Boot 2.5.2; however, I'd expect it to keep breaking, as creating a ConnectionFactory manually is no longer the recommended Spring Boot approach.

We have two options:

  1. Configure the data source with a property instead of programmatically. I prefer this, since that's how the majority of our users will be using R2DBC with Spring Boot.
  2. Use Spring Boot's ConnectionFactoryBuilder, as described in this comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant