wuzeyu
2023-11-30 ee6e575076ba17c1fc8f4ba33253b7ea0fba45f8
1
2
3
4
5
6
7
8
9
10
11
12
package com.dy.common.multiDataSource;
 
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
 
public class MultiDataSource extends AbstractRoutingDataSource {
 
    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceContext.get();
    }
 
}