|
|
|
@ -22,13 +22,13 @@ import java.util.Map;
|
|
|
|
|
public class DataSourceConfiguration {
|
|
|
|
|
|
|
|
|
|
@Bean(name = "masterDataSource")
|
|
|
|
|
@ConfigurationProperties(prefix = "app.datasource.master")
|
|
|
|
|
@ConfigurationProperties(prefix = "spring.datasource.master")
|
|
|
|
|
public DataSource masterDataSource() {
|
|
|
|
|
return DataSourceBuilder.create().type(HikariDataSource.class).build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean(name = "slaveDataSource")
|
|
|
|
|
@ConfigurationProperties(prefix = "app.datasource.slave")
|
|
|
|
|
@ConfigurationProperties(prefix = "spring.datasource.slave")
|
|
|
|
|
public DataSource slaveDataSource() {
|
|
|
|
|
return DataSourceBuilder.create().type(HikariDataSource.class).build();
|
|
|
|
|
}
|
|
|
|
|