-
Notifications
You must be signed in to change notification settings - Fork 41.2k
R2DBC ConnectionFactory
bean silently not created when enabling pooling through R2DBC URL and properties
#28144
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
Comments
Thanks for raising this, @mp911de. Another discrepancy in the behaviour is when the user's indicated that they want to use pooling but
I'll flag this one for team discussion as I'm not sure what our best course of action is to make things behave more consistently and intuitively and what changes we'll be able to make in a maintenance release versus our next minor release. |
We're going to make a URL with |
Making the properties mutually exclusive isn't too bad: https://github.com/wilkinsona/spring-boot/tree/gh-28144. The implementation thus far has raised a couple of questions:
|
I think that's our best option for now. We can always revisit it if someone raises an issue later.
I think we should always fail with an exception. It feels like a configuration error to me. |
When enabling connection pooling for R2DBC through both, the URL (
spring.r2dbc.url=r2dbc:pool:mysql:…
) and by setting the corresponding property (spring.r2dbc.pool.enabled=true
), then Spring Boot backs off entirely from creating aConnectionFactory
. In further consequence, downstream components such asR2dbcEntityTemplate
are not created leading to hard-to-understand errors such as:It would be good to improve the response by either failing hard in such a case or by dropping the pooling configuration advice from the property-based configuration.
Original ticket: spring-projects/spring-data-r2dbc#659
The text was updated successfully, but these errors were encountered: