-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Description
https://docs.spring.io/spring-boot/docs/current/reference/html/howto-data-access.html
The example states the following:
@Bean
@Primary
@ConfigurationProperties("app.datasource.first")
public DataSourceProperties firstDataSourceProperties() {
return new DataSourceProperties();
}
@Bean
@Primary
@ConfigurationProperties("app.datasource.first") //TODO this is wrong.
public DataSource firstDataSource() {
return firstDataSourceProperties().initializeDataSourceBuilder().build();
}
Problem: the key for the DataSource
must be:
app.datasource.first.<datapool name>
, eg app.datasource.first.hikari
. Only then the properties like app.datasource.first.hikari.minimum-idle
will be taken into account.
Likewise for the second ds in the example.
Metadata
Metadata
Assignees
Labels
type: documentationA documentation updateA documentation update