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
Adds javax.sql.DataSource to refreshables #395
Conversation
Why do you think |
Can you take a look at #318 (comment) Most of the time, we use interfaces, not subclasses, so I think 'javax.sql.DataSource' should in the default. |
Please try with boot 2.0.4 and Finchley.SR1 |
I tried it, the problem is still the same, you can look at the sample code provided in #318 (comment). |
I can't run that code as I don't have mysql. Care to update it so there are no external dependencies (ie H2 or similar)? |
I have switched the database from mysql to h2, and the problem still exists. Please take a look. |
Adding the |
Yes, but Hikari is used by default |
What we're going to try and do is inspect the implementation type of the bean, that way we don't have to add |
After trying to implement this, we are going to add a documentation note, but you should either set @Primary
@Bean(name = "dbDataSource")
@ConfigurationProperties(prefix = "datasource.db")
public HikariDataSource dbDataSource() {
return DataSourceBuilder.create().type(HikariDataSource.class).build();
} |
…initionOverriding See gh-395
Perfecting the processing method of gh-318