Browse Source

重复扫描 baseMapper 的,tableinfo 缓存的 Configuration 改为只保留后一个

miemie 6 years ago
parent
commit
7bd6c1032d

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/TableInfoHelper.java

@@ -113,7 +113,7 @@ public class TableInfoHelper {
     public synchronized static TableInfo initTableInfo(MapperBuilderAssistant builderAssistant, Class<?> clazz) {
         TableInfo tableInfo = TABLE_INFO_CACHE.get(clazz);
         if (tableInfo != null) {
-            if (tableInfo.getConfigMark() == null && builderAssistant != null) {
+            if (builderAssistant != null) {
                 tableInfo.setConfigMark(builderAssistant.getConfiguration());
             }
             return tableInfo;