mirror of
https://github.com/drtrang/druid-spring-boot.git
synced 2026-11-23 14:04:18 +00:00
1.0.3
This commit is contained in:
+2
-2
@@ -52,8 +52,8 @@ public class SpringDataSourceConfig {
|
||||
@Primary
|
||||
public DynamicDataSource dataSource(DruidDataSource firstDataSource, DruidDataSource secondDataSource) {
|
||||
Map<String, DataSource> targetDataSources = new HashMap<>();
|
||||
targetDataSources.put("one", firstDataSource);
|
||||
targetDataSources.put("two", secondDataSource);
|
||||
targetDataSources.put(firstDataSource.getName(), firstDataSource);
|
||||
targetDataSources.put(secondDataSource.getName(), secondDataSource);
|
||||
return new DynamicDataSource(firstDataSource, targetDataSources);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user