diff --git a/mybatis-flex-core/pom.xml b/mybatis-flex-core/pom.xml
index db237694..bc745c0d 100644
--- a/mybatis-flex-core/pom.xml
+++ b/mybatis-flex-core/pom.xml
@@ -98,6 +98,13 @@
test
+
+ com.mybatis-flex
+ mybatis-flex-annotation
+ 1.7.3
+ compile
+
+
diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java
index db6e1430..b61464c8 100644
--- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java
+++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java
@@ -70,7 +70,7 @@ public class MapperInvocationHandler implements InvocationHandler {
//最终通过数据源 自定义分片 策略去获取
String shardingDataSourceKey = DataSourceKey.getByShardingStrategy(dataSourceKey, proxy, method, args);
if (shardingDataSourceKey != null && !shardingDataSourceKey.equals(dataSourceKey)) {
- DataSourceKey.use(dataSourceKey);
+ DataSourceKey.use(shardingDataSourceKey);
needClearDsKey = true;
}