Skip to content

Commit

Permalink
xiugai mingzi
Browse files Browse the repository at this point in the history
  • Loading branch information
527515025 committed Mar 19, 2020
1 parent 290ba9f commit 484c4cc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public DataSource getUserDataSource() {

@Bean("dynamicDataSource")
public DynamicDataSource dynamicDataSource(@Qualifier("primaryDataSource") DataSource primaryDataSource,
@Qualifier("userDataSource") DataSource miaoMoreDataSource) {
@Qualifier("userDataSource") DataSource userDataSource) {
Map<Object, Object> targetDataSources = new HashMap<>();
targetDataSources.put(DatabaseTypeEnum.PRIMARY, primaryDataSource);
targetDataSources.put(DatabaseTypeEnum.USER, miaoMoreDataSource);
targetDataSources.put(DatabaseTypeEnum.USER, userDataSource);

DynamicDataSource dataSource = new DynamicDataSource();
dataSource.setTargetDataSources(targetDataSources);// 该方法是AbstractRoutingDataSource的方法
Expand Down

0 comments on commit 484c4cc

Please sign in to comment.