Caratacus 8 年之前
父節點
當前提交
7007d98814
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      mybatis-plus/src/main/java/com/baomidou/mybatisplus/MybatisXMLConfigBuilder.java

+ 4 - 4
mybatis-plus/src/main/java/com/baomidou/mybatisplus/MybatisXMLConfigBuilder.java

@@ -370,11 +370,11 @@ public class MybatisXMLConfigBuilder extends BaseBuilder {
         /**
         /**
          * 定义集合 用来分类放置mybatis的Mapper与XML 按顺序依次遍历
          * 定义集合 用来分类放置mybatis的Mapper与XML 按顺序依次遍历
          */
          */
-        //指定在classpath中的mapper文件
-        Set<String> resources = new HashSet<String>();
-        //指向一个mapper接口
-        Set<Class<?>> mapperClasses = new HashSet<Class<?>>();
         if (parent != null) {
         if (parent != null) {
+            //指定在classpath中的mapper文件
+            Set<String> resources = new HashSet<String>();
+            //指向一个mapper接口
+            Set<Class<?>> mapperClasses = new HashSet<Class<?>>();
             setResource(parent, resources, mapperClasses);
             setResource(parent, resources, mapperClasses);
             // 依次遍历 首先 resource 然后 mapper
             // 依次遍历 首先 resource 然后 mapper
             for (String resource : resources) {
             for (String resource : resources) {