I went back to programming my old program https://github.com/JonkiPro/REST-Web-Services. I\'ve updated Spring Boot from version 15.6 to version 2.0.0. I have encountered many pr
I had the same issue in another context. From the 79. Data Access - Configure a Custom DataSource
if you happen to have Hikari on the classpath, this basic setup does not work, because Hikari has no url property (but does have a jdbcUrl property)
Hikari is the default pool in spring boot 2.
so you can replace the config
url: jdbc:postgresql:database
-> jdbc-url: jdbc:postgresql:database
or you can keep the config but you need to define another Bean to handle the mapping (aliases)
@Bean
@Primary
@ConfigurationProperties("app.datasource")
public DataSourceProperties dataSourceProperties() {
return new DataSourceProperties();
}
@Bean
@ConfigurationProperties("app.datasource")
public DataSource dataSource(DataSourceProperties properties) {
return properties.initializeDataSourceBuilder().
.build();
}