-
Notifications
You must be signed in to change notification settings - Fork 41.2k
DataSourceBuilder should only alias a property when the expected DataSource is configured #23480
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
Taking a step back, it's rather |
To reproduce quickly the issue, you need to patch |
Unfortunately we might not be able to fix this one by changing the alias logic. The |
I committed a change in pull request #23403 that doesn't use ConfigurationPropertySource in favour of plain BeanWrapper plus some custom logic local to DataSourceBuilder. It's not super-clean, but does the job. |
@fabio-grassi-gbs I saw that, that's an interesting approach. I think we'd prefer something more declarative and I've been working on that Friday. |
This comment has been minimized.
This comment has been minimized.
Taking that back, that's rather a type safety issue as we have a test to cover that use case. Looking at the hierarchy, I'll settle for |
I've refined things in ef2fee2 |
DataSourceBuilder
has a number of aliases to accommodate for small changes in API. For instance, Hikari has ajdbc-url
rather than the more commonurl
property so we have a mapping for that. This mapping is useless if theDataSource
we configure isn't using Hikari.So far we got away with it, but adding support for Oracle UCP means we need to add yet another alias that's actually a valid property for DBCP2 (yet referring to something completely different).
The text was updated successfully, but these errors were encountered: