mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
style: 属性 dsCache 放在类的开始位置。
This commit is contained in:
parent
6185b433e1
commit
af718a6cff
@ -36,6 +36,11 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
*/
|
||||
public class DataSourceInterceptor implements MethodInterceptor {
|
||||
|
||||
/**
|
||||
* 缓存方法对应的数据源。
|
||||
*/
|
||||
private final Map<Object, String> dsCache = new ConcurrentHashMap<>();
|
||||
|
||||
@Override
|
||||
public Object invoke(MethodInvocation invocation) throws Throwable {
|
||||
|
||||
@ -57,11 +62,6 @@ public class DataSourceInterceptor implements MethodInterceptor {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存方法对应的数据源。
|
||||
*/
|
||||
private final Map<Object, String> dsCache = new ConcurrentHashMap<>();
|
||||
|
||||
private String findDataSourceKey(Method method, Class<?> targetClass) {
|
||||
Object cacheKey = new MethodClassKey(method, targetClass);
|
||||
String dsKey = this.dsCache.get(cacheKey);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user