-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
DataSource url property is ignored when there is no connection pool #19576
Conversation
Thanks for the PR @nosan.
It's not meant to at the moment. The supported connection pools are commons-dbcp2, tomcat and hikari (default). |
Thanks for the feedback, @snicoll
Yes, I saw that when I was working on this PR. @Test
void explicitTypeSupportedDataSource() {
this.contextRunner
.withPropertyValues("spring.datasource.driverClassName:org.hsqldb.jdbcDriver",
"spring.datasource.url:jdbc:hsqldb:mem:testdb",
"spring.datasource.type:" + SimpleDriverDataSource.class.getName())
.run(this::containsOnlySimpleDriverDataSource);
} Actually, this test just checks that
This happens because
P.S. I think you are right and this is not related to the initial issue. |
4742549
to
6819f48
Compare
|
||
} | ||
|
||
static class GenericCondition extends AnyNestedCondition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rename this when merging. Something like ExplicitDataSourceTypeOrUrlCondition
.
@@ -158,6 +158,20 @@ void explicitTypeNoSupportedDataSource() { | |||
.run(this::containsOnlySimpleDriverDataSource); | |||
} | |||
|
|||
/** | |||
* This test makes sure that if no supported pool data source is present, a datasource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, when merging, we should replace this comment with a descriptive test method name
I was looking at this PR and I am not keen to bring support for With a polish that doesn't bring support for
I suggest to improve that so that our failure analyzer catch that and provide a dedicated error message. We can then add support for |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@nosan thank you for your effort on this but I am not keen to bring |
see gh-19192
Btw, I found an issue in
DataSourceBuilder
, the builder does not supportSimpleDriverDataSource
without aliasaliases.addAliases("driver-class-name", "driver-class")
Here is a test to reproduce:
`
UPDATE
My first approach was incorrect. Sorry for the inconvenience.