Browse Source

替换过时方法.

nieqiuqiu 5 years ago
parent
commit
586f2a14c1
36 changed files with 112 additions and 112 deletions
  1. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisDefaultParameterHandler.java
  2. 4 4
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/AbstractWrapper.java
  3. 2 2
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/Wrapper.java
  4. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/update/LambdaUpdateWrapper.java
  5. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/update/UpdateWrapper.java
  6. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/injector/methods/Insert.java
  7. 11 11
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableFieldInfo.java
  8. 6 6
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfo.java
  9. 11 11
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfoHelper.java
  10. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/Assert.java
  11. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/LambdaUtils.java
  12. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/PluginUtils.java
  13. 1 1
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/Sequence.java
  14. 7 7
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/StringUtils.java
  15. 8 8
      mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/sql/SqlScriptUtils.java
  16. 1 1
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/injector/methods/additional/InsertBatchSomeColumn.java
  17. 1 1
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/p6spy/P6SpyLogger.java
  18. 2 2
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/IllegalSQLInterceptor.java
  19. 4 4
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/PaginationInterceptor.java
  20. 1 1
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination/DialectFactory.java
  21. 1 1
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination/dialects/SQLServer2005Dialect.java
  22. 1 1
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/toolkit/JdbcUtils.java
  23. 1 1
      mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/toolkit/VersionUtils.java
  24. 1 1
      mybatis-plus-extension/src/main/kotlin/com/baomidou/mybatisplus/extension/kotlin/KtUpdateWrapper.kt
  25. 2 2
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/AutoGenerator.java
  26. 1 1
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/PackageConfig.java
  27. 17 17
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/builder/ConfigBuilder.java
  28. 1 1
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/po/TableInfo.java
  29. 5 5
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/rules/NamingStrategy.java
  30. 3 3
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/engine/AbstractTemplateEngine.java
  31. 1 1
      mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/engine/VelocityTemplateEngine.java
  32. 1 1
      mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/test/generator/DMGenerator.java
  33. 1 1
      mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/test/generator/SqliteGeneratorTest.java
  34. 3 3
      mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/base/type/ListTypeHandler.java
  35. 3 3
      mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/base/type/MapTypeHandler.java
  36. 4 4
      mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/toolkit/StringUtilsTest.java

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

@@ -173,7 +173,7 @@ public class MybatisDefaultParameterHandler extends DefaultParameterHandler {
         /* 自定义元对象填充控制器 */
         /* 自定义元对象填充控制器 */
         MetaObject metaObject = ms.getConfiguration().newMetaObject(parameterObject);
         MetaObject metaObject = ms.getConfiguration().newMetaObject(parameterObject);
         // 填充主键
         // 填充主键
-        if (isInsert && !StringUtils.isEmpty(tableInfo.getKeyProperty())
+        if (isInsert && !StringUtils.isBlank(tableInfo.getKeyProperty())
             && null != tableInfo.getIdType() && tableInfo.getIdType().getKey() >= 3) {
             && null != tableInfo.getIdType() && tableInfo.getIdType().getKey() >= 3) {
             IdGenerator idGenerator = GlobalConfigUtils.getGlobalConfig(tableInfo.getConfiguration()).getIdGenerator();
             IdGenerator idGenerator = GlobalConfigUtils.getGlobalConfig(tableInfo.getConfiguration()).getIdGenerator();
             Object idValue = metaObject.getValue(tableInfo.getKeyProperty());
             Object idValue = metaObject.getValue(tableInfo.getKeyProperty());

+ 4 - 4
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/AbstractWrapper.java

@@ -378,7 +378,7 @@ public abstract class AbstractWrapper<T, R, Children extends AbstractWrapper<T,
      * @return sql
      * @return sql
      */
      */
     protected final String formatSqlIfNeed(boolean need, String sqlStr, Object... params) {
     protected final String formatSqlIfNeed(boolean need, String sqlStr, Object... params) {
-        if (!need || StringUtils.isEmpty(sqlStr)) {
+        if (!need || StringUtils.isBlank(sqlStr)) {
             return null;
             return null;
         }
         }
         if (ArrayUtils.isNotEmpty(params)) {
         if (ArrayUtils.isNotEmpty(params)) {
@@ -430,10 +430,10 @@ public abstract class AbstractWrapper<T, R, Children extends AbstractWrapper<T,
     @Override
     @Override
     public String getSqlSegment() {
     public String getSqlSegment() {
         String sqlSegment = expression.getSqlSegment();
         String sqlSegment = expression.getSqlSegment();
-        if (StringUtils.isNotEmpty(sqlSegment)) {
+        if (StringUtils.isNotBlank(sqlSegment)) {
             return sqlSegment + lastSql.getStringValue();
             return sqlSegment + lastSql.getStringValue();
         }
         }
-        if (StringUtils.isNotEmpty(lastSql.getStringValue())) {
+        if (StringUtils.isNotBlank(lastSql.getStringValue())) {
             return lastSql.getStringValue();
             return lastSql.getStringValue();
         }
         }
         return null;
         return null;
@@ -441,7 +441,7 @@ public abstract class AbstractWrapper<T, R, Children extends AbstractWrapper<T,
 
 
     @Override
     @Override
     public String getSqlComment() {
     public String getSqlComment() {
-        if (StringUtils.isNotEmpty(sqlComment.getStringValue())) {
+        if (StringUtils.isNotBlank(sqlComment.getStringValue())) {
             return "/*" + StringEscape.escapeRawString(sqlComment.getStringValue()) + "*/";
             return "/*" + StringEscape.escapeRawString(sqlComment.getStringValue()) + "*/";
         }
         }
         return null;
         return null;

+ 2 - 2
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/Wrapper.java

@@ -71,7 +71,7 @@ public abstract class Wrapper<T> implements ISqlSegment {
         if (Objects.nonNull(expression)) {
         if (Objects.nonNull(expression)) {
             NormalSegmentList normal = expression.getNormal();
             NormalSegmentList normal = expression.getNormal();
             String sqlSegment = getSqlSegment();
             String sqlSegment = getSqlSegment();
-            if (StringUtils.isNotEmpty(sqlSegment)) {
+            if (StringUtils.isNotBlank(sqlSegment)) {
                 if (normal.isEmpty()) {
                 if (normal.isEmpty()) {
                     return sqlSegment;
                     return sqlSegment;
                 } else {
                 } else {
@@ -127,7 +127,7 @@ public abstract class Wrapper<T> implements ISqlSegment {
         if (tableInfo.getFieldList().stream().anyMatch(e -> fieldStrategyMatch(entity, e))) {
         if (tableInfo.getFieldList().stream().anyMatch(e -> fieldStrategyMatch(entity, e))) {
             return true;
             return true;
         }
         }
-        return StringUtils.isNotEmpty(tableInfo.getKeyProperty()) ? Objects.nonNull(ReflectionKit.getMethodValue(entity, tableInfo.getKeyProperty())) : false;
+        return StringUtils.isNotBlank(tableInfo.getKeyProperty()) ? Objects.nonNull(ReflectionKit.getMethodValue(entity, tableInfo.getKeyProperty())) : false;
     }
     }
 
 
     /**
     /**

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/update/LambdaUpdateWrapper.java

@@ -85,7 +85,7 @@ public class LambdaUpdateWrapper<T> extends AbstractLambdaWrapper<T, LambdaUpdat
 
 
     @Override
     @Override
     public LambdaUpdateWrapper<T> setSql(boolean condition, String sql) {
     public LambdaUpdateWrapper<T> setSql(boolean condition, String sql) {
-        if (condition && StringUtils.isNotEmpty(sql)) {
+        if (condition && StringUtils.isNotBlank(sql)) {
             sqlSet.add(sql);
             sqlSet.add(sql);
         }
         }
         return typedThis;
         return typedThis;

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/update/UpdateWrapper.java

@@ -83,7 +83,7 @@ public class UpdateWrapper<T> extends AbstractWrapper<T, String, UpdateWrapper<T
 
 
     @Override
     @Override
     public UpdateWrapper<T> setSql(boolean condition, String sql) {
     public UpdateWrapper<T> setSql(boolean condition, String sql) {
-        if (condition && StringUtils.isNotEmpty(sql)) {
+        if (condition && StringUtils.isNotBlank(sql)) {
             sqlSet.add(sql);
             sqlSet.add(sql);
         }
         }
         return typedThis;
         return typedThis;

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/injector/methods/Insert.java

@@ -48,7 +48,7 @@ public class Insert extends AbstractMethod {
         String keyProperty = null;
         String keyProperty = null;
         String keyColumn = null;
         String keyColumn = null;
         // 表包含主键处理逻辑,如果不包含主键当普通字段处理
         // 表包含主键处理逻辑,如果不包含主键当普通字段处理
-        if (StringUtils.isNotEmpty(tableInfo.getKeyProperty())) {
+        if (StringUtils.isNotBlank(tableInfo.getKeyProperty())) {
             if (tableInfo.getIdType() == IdType.AUTO) {
             if (tableInfo.getIdType() == IdType.AUTO) {
                 /** 自增主键 */
                 /** 自增主键 */
                 keyGenerator = new Jdbc3KeyGenerator();
                 keyGenerator = new Jdbc3KeyGenerator();

+ 11 - 11
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableFieldInfo.java

@@ -167,14 +167,14 @@ public class TableFieldInfo implements Constants {
             this.typeHandler = (Class<? extends TypeHandler<?>>) typeHandler;
             this.typeHandler = (Class<? extends TypeHandler<?>>) typeHandler;
             el += (COMMA + "typeHandler=" + typeHandler.getName());
             el += (COMMA + "typeHandler=" + typeHandler.getName());
         }
         }
-        if (StringUtils.isNotEmpty(numericScale)) {
+        if (StringUtils.isNotBlank(numericScale)) {
             el += (COMMA + "numericScale=" + numericScale);
             el += (COMMA + "numericScale=" + numericScale);
         }
         }
         this.el = el;
         this.el = el;
         tableInfo.setLogicDelete(this.initLogicDelete(dbConfig, field));
         tableInfo.setLogicDelete(this.initLogicDelete(dbConfig, field));
 
 
         String column = tableField.value();
         String column = tableField.value();
-        if (StringUtils.isEmpty(column)) {
+        if (StringUtils.isBlank(column)) {
             column = this.property;
             column = this.property;
             if (tableInfo.isUnderCamel()) {
             if (tableInfo.isUnderCamel()) {
                 /* 开启字段下划线申明 */
                 /* 开启字段下划线申明 */
@@ -186,7 +186,7 @@ public class TableFieldInfo implements Constants {
             }
             }
         }
         }
         String columnFormat = dbConfig.getColumnFormat();
         String columnFormat = dbConfig.getColumnFormat();
-        if (StringUtils.isNotEmpty(columnFormat) && tableField.keepGlobalFormat()) {
+        if (StringUtils.isNotBlank(columnFormat) && tableField.keepGlobalFormat()) {
             column = String.format(columnFormat, column);
             column = String.format(columnFormat, column);
         }
         }
 
 
@@ -218,7 +218,7 @@ public class TableFieldInfo implements Constants {
             this.whereStrategy = tableField.whereStrategy();
             this.whereStrategy = tableField.whereStrategy();
         }
         }
 
 
-        if (StringUtils.isNotEmpty(tableField.condition())) {
+        if (StringUtils.isNotBlank(tableField.condition())) {
             // 细粒度条件控制
             // 细粒度条件控制
             this.condition = tableField.condition();
             this.condition = tableField.condition();
         }
         }
@@ -252,7 +252,7 @@ public class TableFieldInfo implements Constants {
         }
         }
 
 
         String columnFormat = dbConfig.getColumnFormat();
         String columnFormat = dbConfig.getColumnFormat();
-        if (StringUtils.isNotEmpty(columnFormat)) {
+        if (StringUtils.isNotBlank(columnFormat)) {
             column = String.format(columnFormat, column);
             column = String.format(columnFormat, column);
         }
         }
 
 
@@ -270,12 +270,12 @@ public class TableFieldInfo implements Constants {
         /* 获取注解属性,逻辑处理字段 */
         /* 获取注解属性,逻辑处理字段 */
         TableLogic tableLogic = field.getAnnotation(TableLogic.class);
         TableLogic tableLogic = field.getAnnotation(TableLogic.class);
         if (null != tableLogic) {
         if (null != tableLogic) {
-            if (StringUtils.isNotEmpty(tableLogic.value())) {
+            if (StringUtils.isNotBlank(tableLogic.value())) {
                 this.logicNotDeleteValue = tableLogic.value();
                 this.logicNotDeleteValue = tableLogic.value();
             } else {
             } else {
                 this.logicNotDeleteValue = dbConfig.getLogicNotDeleteValue();
                 this.logicNotDeleteValue = dbConfig.getLogicNotDeleteValue();
             }
             }
-            if (StringUtils.isNotEmpty(tableLogic.delval())) {
+            if (StringUtils.isNotBlank(tableLogic.delval())) {
                 this.logicDeleteValue = tableLogic.delval();
                 this.logicDeleteValue = tableLogic.delval();
             } else {
             } else {
                 this.logicDeleteValue = dbConfig.getLogicDeleteValue();
                 this.logicDeleteValue = dbConfig.getLogicDeleteValue();
@@ -283,7 +283,7 @@ public class TableFieldInfo implements Constants {
             return true;
             return true;
         } else {
         } else {
             String globalLogicDeleteField = dbConfig.getLogicDeleteField();
             String globalLogicDeleteField = dbConfig.getLogicDeleteField();
-            if (StringUtils.isNotEmpty(globalLogicDeleteField) && globalLogicDeleteField.equalsIgnoreCase(field.getName())) {
+            if (StringUtils.isNotBlank(globalLogicDeleteField) && globalLogicDeleteField.equalsIgnoreCase(field.getName())) {
                 this.logicNotDeleteValue = dbConfig.getLogicNotDeleteValue();
                 this.logicNotDeleteValue = dbConfig.getLogicNotDeleteValue();
                 this.logicDeleteValue = dbConfig.getLogicDeleteValue();
                 this.logicDeleteValue = dbConfig.getLogicDeleteValue();
                 return true;
                 return true;
@@ -296,7 +296,7 @@ public class TableFieldInfo implements Constants {
      * 是否注解了逻辑删除
      * 是否注解了逻辑删除
      */
      */
     public boolean isLogicDelete() {
     public boolean isLogicDelete() {
-        return StringUtils.isNotEmpty(logicDeleteValue);
+        return StringUtils.isNotBlank(logicDeleteValue);
     }
     }
 
 
     /**
     /**
@@ -397,7 +397,7 @@ public class TableFieldInfo implements Constants {
         final String newPrefix = prefix == null ? EMPTY : prefix;
         final String newPrefix = prefix == null ? EMPTY : prefix;
         // 默认: column=
         // 默认: column=
         String sqlSet = column + EQUALS;
         String sqlSet = column + EQUALS;
-        if (StringUtils.isNotEmpty(update)) {
+        if (StringUtils.isNotBlank(update)) {
             sqlSet += String.format(update, column);
             sqlSet += String.format(update, column);
         } else {
         } else {
             sqlSet += SqlScriptUtils.safeParam(newPrefix + el);
             sqlSet += SqlScriptUtils.safeParam(newPrefix + el);
@@ -414,7 +414,7 @@ public class TableFieldInfo implements Constants {
     }
     }
 
 
     private String convertIfProperty(String prefix, String property) {
     private String convertIfProperty(String prefix, String property) {
-        return StringUtils.isNotEmpty(prefix) ? prefix.substring(0, prefix.length() - 1) + "['" + property + "']" : property;
+        return StringUtils.isNotBlank(prefix) ? prefix.substring(0, prefix.length() - 1) + "['" + property + "']" : property;
     }
     }
 
 
     /**
     /**

+ 6 - 6
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfo.java

@@ -169,7 +169,7 @@ public class TableInfo implements Constants {
         if (sqlSelect != null) {
         if (sqlSelect != null) {
             return sqlSelect;
             return sqlSelect;
         }
         }
-        if (StringUtils.isNotEmpty(keyProperty)) {
+        if (StringUtils.isNotBlank(keyProperty)) {
             sqlSelect = keyColumn;
             sqlSelect = keyColumn;
             if (keyRelated) {
             if (keyRelated) {
                 sqlSelect += (" AS " + keyProperty);
                 sqlSelect += (" AS " + keyProperty);
@@ -203,9 +203,9 @@ public class TableInfo implements Constants {
         String sqlSelect = getKeySqlSelect();
         String sqlSelect = getKeySqlSelect();
         String fieldsSqlSelect = fieldList.stream().filter(predicate)
         String fieldsSqlSelect = fieldList.stream().filter(predicate)
             .map(TableFieldInfo::getSqlSelect).collect(joining(COMMA));
             .map(TableFieldInfo::getSqlSelect).collect(joining(COMMA));
-        if (StringUtils.isNotEmpty(sqlSelect) && StringUtils.isNotEmpty(fieldsSqlSelect)) {
+        if (StringUtils.isNotBlank(sqlSelect) && StringUtils.isNotBlank(fieldsSqlSelect)) {
             return sqlSelect + COMMA + fieldsSqlSelect;
             return sqlSelect + COMMA + fieldsSqlSelect;
-        } else if (StringUtils.isNotEmpty(fieldsSqlSelect)) {
+        } else if (StringUtils.isNotBlank(fieldsSqlSelect)) {
             return fieldsSqlSelect;
             return fieldsSqlSelect;
         }
         }
         return sqlSelect;
         return sqlSelect;
@@ -220,7 +220,7 @@ public class TableInfo implements Constants {
      */
      */
     public String getKeyInsertSqlProperty(final String prefix, final boolean newLine) {
     public String getKeyInsertSqlProperty(final String prefix, final boolean newLine) {
         final String newPrefix = prefix == null ? EMPTY : prefix;
         final String newPrefix = prefix == null ? EMPTY : prefix;
-        if (StringUtils.isNotEmpty(keyProperty)) {
+        if (StringUtils.isNotBlank(keyProperty)) {
             if (idType == IdType.AUTO) {
             if (idType == IdType.AUTO) {
                 return EMPTY;
                 return EMPTY;
             }
             }
@@ -237,7 +237,7 @@ public class TableInfo implements Constants {
      * @return sql 脚本片段
      * @return sql 脚本片段
      */
      */
     public String getKeyInsertSqlColumn(final boolean newLine) {
     public String getKeyInsertSqlColumn(final boolean newLine) {
-        if (StringUtils.isNotEmpty(keyColumn)) {
+        if (StringUtils.isNotBlank(keyColumn)) {
             if (idType == IdType.AUTO) {
             if (idType == IdType.AUTO) {
                 return EMPTY;
                 return EMPTY;
             }
             }
@@ -293,7 +293,7 @@ public class TableInfo implements Constants {
                 return true;
                 return true;
             })
             })
             .map(i -> i.getSqlWhere(newPrefix)).filter(Objects::nonNull).collect(joining(NEWLINE));
             .map(i -> i.getSqlWhere(newPrefix)).filter(Objects::nonNull).collect(joining(NEWLINE));
-        if (!withId || StringUtils.isEmpty(keyProperty)) {
+        if (!withId || StringUtils.isBlank(keyProperty)) {
             return filedSqlScript;
             return filedSqlScript;
         }
         }
         String newKeyProperty = newPrefix + keyProperty;
         String newKeyProperty = newPrefix + keyProperty;

+ 11 - 11
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfoHelper.java

@@ -167,19 +167,19 @@ public class TableInfoHelper {
         boolean tablePrefixEffect = true;
         boolean tablePrefixEffect = true;
 
 
         if (table != null) {
         if (table != null) {
-            if (StringUtils.isNotEmpty(table.value())) {
+            if (StringUtils.isNotBlank(table.value())) {
                 tableName = table.value();
                 tableName = table.value();
-                if (StringUtils.isNotEmpty(tablePrefix) && !table.keepGlobalPrefix()) {
+                if (StringUtils.isNotBlank(tablePrefix) && !table.keepGlobalPrefix()) {
                     tablePrefixEffect = false;
                     tablePrefixEffect = false;
                 }
                 }
             } else {
             } else {
                 tableName = initTableNameWithDbConfig(tableName, dbConfig);
                 tableName = initTableNameWithDbConfig(tableName, dbConfig);
             }
             }
-            if (StringUtils.isNotEmpty(table.schema())) {
+            if (StringUtils.isNotBlank(table.schema())) {
                 schema = table.schema();
                 schema = table.schema();
             }
             }
             /* 表结果集映射 */
             /* 表结果集映射 */
-            if (StringUtils.isNotEmpty(table.resultMap())) {
+            if (StringUtils.isNotBlank(table.resultMap())) {
                 tableInfo.setResultMap(table.resultMap());
                 tableInfo.setResultMap(table.resultMap());
             }
             }
             tableInfo.setAutoInitResultMap(table.autoResultMap());
             tableInfo.setAutoInitResultMap(table.autoResultMap());
@@ -188,10 +188,10 @@ public class TableInfoHelper {
         }
         }
 
 
         String targetTableName = tableName;
         String targetTableName = tableName;
-        if (StringUtils.isNotEmpty(tablePrefix) && tablePrefixEffect) {
+        if (StringUtils.isNotBlank(tablePrefix) && tablePrefixEffect) {
             targetTableName = tablePrefix + targetTableName;
             targetTableName = tablePrefix + targetTableName;
         }
         }
-        if (StringUtils.isNotEmpty(schema)) {
+        if (StringUtils.isNotBlank(schema)) {
             targetTableName = schema + StringPool.DOT + targetTableName;
             targetTableName = schema + StringPool.DOT + targetTableName;
         }
         }
 
 
@@ -276,7 +276,7 @@ public class TableInfoHelper {
         tableInfo.setFieldList(Collections.unmodifiableList(fieldList));
         tableInfo.setFieldList(Collections.unmodifiableList(fieldList));
 
 
         /* 未发现主键注解,提示警告信息 */
         /* 未发现主键注解,提示警告信息 */
-        if (StringUtils.isEmpty(tableInfo.getKeyColumn())) {
+        if (StringUtils.isBlank(tableInfo.getKeyColumn())) {
             logger.warn(String.format("Warn: Could not find @TableId in Class: %s.", clazz.getName()));
             logger.warn(String.format("Warn: Could not find @TableId in Class: %s.", clazz.getName()));
         }
         }
     }
     }
@@ -309,7 +309,7 @@ public class TableInfoHelper {
         TableId tableId = field.getAnnotation(TableId.class);
         TableId tableId = field.getAnnotation(TableId.class);
         boolean underCamel = tableInfo.isUnderCamel();
         boolean underCamel = tableInfo.isUnderCamel();
         if (tableId != null) {
         if (tableId != null) {
-            if (StringUtils.isEmpty(tableInfo.getKeyColumn())) {
+            if (StringUtils.isBlank(tableInfo.getKeyColumn())) {
                 /* 主键策略( 注解 > 全局 ) */
                 /* 主键策略( 注解 > 全局 ) */
                 // 设置 Sequence 其他策略无效
                 // 设置 Sequence 其他策略无效
                 if (IdType.NONE == tableId.type()) {
                 if (IdType.NONE == tableId.type()) {
@@ -320,7 +320,7 @@ public class TableInfoHelper {
 
 
                 /* 字段 */
                 /* 字段 */
                 String column = field.getName();
                 String column = field.getName();
-                if (StringUtils.isNotEmpty(tableId.value())) {
+                if (StringUtils.isNotBlank(tableId.value())) {
                     column = tableId.value();
                     column = tableId.value();
                 } else {
                 } else {
                     // 开启字段下划线申明
                     // 开启字段下划线申明
@@ -361,7 +361,7 @@ public class TableInfoHelper {
             column = column.toUpperCase();
             column = column.toUpperCase();
         }
         }
         if (DEFAULT_ID_NAME.equalsIgnoreCase(column)) {
         if (DEFAULT_ID_NAME.equalsIgnoreCase(column)) {
-            if (StringUtils.isEmpty(tableInfo.getKeyColumn())) {
+            if (StringUtils.isBlank(tableInfo.getKeyColumn())) {
                 tableInfo.setKeyRelated(checkRelated(tableInfo.isUnderCamel(), field.getName(), column))
                 tableInfo.setKeyRelated(checkRelated(tableInfo.isUnderCamel(), field.getName(), column))
                     .setIdType(dbConfig.getIdType())
                     .setIdType(dbConfig.getIdType())
                     .setKeyColumn(column)
                     .setKeyColumn(column)
@@ -467,7 +467,7 @@ public class TableInfoHelper {
         Configuration configuration = builderAssistant.getConfiguration();
         Configuration configuration = builderAssistant.getConfiguration();
         //TODO 这里不加上builderAssistant.getCurrentNamespace()的会导致com.baomidou.mybatisplus.core.parser.SqlParserHelper.getSqlParserInfo越(chu)界(gui)
         //TODO 这里不加上builderAssistant.getCurrentNamespace()的会导致com.baomidou.mybatisplus.core.parser.SqlParserHelper.getSqlParserInfo越(chu)界(gui)
         String id = builderAssistant.getCurrentNamespace() + StringPool.DOT + baseStatementId + SelectKeyGenerator.SELECT_KEY_SUFFIX;
         String id = builderAssistant.getCurrentNamespace() + StringPool.DOT + baseStatementId + SelectKeyGenerator.SELECT_KEY_SUFFIX;
-        ResultMap resultMap = new ResultMap.Builder(builderAssistant.getConfiguration(), id + "!keyResultMap", tableInfo.getKeyType(), new ArrayList<>()).build();
+        ResultMap resultMap = new ResultMap.Builder(builderAssistant.getConfiguration(), id, tableInfo.getKeyType(), new ArrayList<>()).build();
         MappedStatement mappedStatement = new MappedStatement.Builder(builderAssistant.getConfiguration(), id,
         MappedStatement mappedStatement = new MappedStatement.Builder(builderAssistant.getConfiguration(), id,
             new StaticSqlSource(configuration, keyGenerator.executeSql(tableInfo.getKeySequence().value())), SqlCommandType.SELECT)
             new StaticSqlSource(configuration, keyGenerator.executeSql(tableInfo.getKeySequence().value())), SqlCommandType.SELECT)
             .keyProperty(tableInfo.getKeyProperty())
             .keyProperty(tableInfo.getKeyProperty())

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

@@ -80,7 +80,7 @@ public final class Assert {
      * @param message 消息
      * @param message 消息
      */
      */
     public static void notEmpty(String value, String message, Object... params) {
     public static void notEmpty(String value, String message, Object... params) {
-        isTrue(StringUtils.isNotEmpty(value), message, params);
+        isTrue(StringUtils.isNotBlank(value), message, params);
     }
     }
 
 
     /**
     /**

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

@@ -100,7 +100,7 @@ public final class LambdaUtils {
         Map<String, ColumnCache> map = new HashMap<>();
         Map<String, ColumnCache> map = new HashMap<>();
 
 
         String kp = info.getKeyProperty();
         String kp = info.getKeyProperty();
-        if (StringUtils.isNotEmpty(kp)) {
+        if (StringUtils.isNotBlank(kp)) {
             map.put(formatKey(kp), new ColumnCache(info.getKeyColumn(), info.getKeySqlSelect()));
             map.put(formatKey(kp), new ColumnCache(info.getKeyColumn(), info.getKeySqlSelect()));
         }
         }
 
 

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

@@ -51,6 +51,6 @@ public final class PluginUtils {
      */
      */
     public static String getProperty(Properties properties, String key) {
     public static String getProperty(Properties properties, String key) {
         String value = properties.getProperty(key);
         String value = properties.getProperty(key);
-        return StringUtils.isEmpty(value) ? null : value;
+        return StringUtils.isBlank(value) ? null : value;
     }
     }
 }
 }

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

@@ -98,7 +98,7 @@ public class Sequence {
         StringBuilder mpid = new StringBuilder();
         StringBuilder mpid = new StringBuilder();
         mpid.append(datacenterId);
         mpid.append(datacenterId);
         String name = ManagementFactory.getRuntimeMXBean().getName();
         String name = ManagementFactory.getRuntimeMXBean().getName();
-        if (StringUtils.isNotEmpty(name)) {
+        if (StringUtils.isNotBlank(name)) {
             /*
             /*
              * GET jvmPid
              * GET jvmPid
              */
              */

+ 7 - 7
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/StringUtils.java

@@ -189,7 +189,7 @@ public final class StringUtils {
      * @return 转换好的字符串
      * @return 转换好的字符串
      */
      */
     public static String camelToUnderline(String param) {
     public static String camelToUnderline(String param) {
-        if (isEmpty(param)) {
+        if (isBlank(param)) {
             return EMPTY;
             return EMPTY;
         }
         }
         int len = param.length();
         int len = param.length();
@@ -211,7 +211,7 @@ public final class StringUtils {
      * @return 转换好的字符串
      * @return 转换好的字符串
      */
      */
     public static String underlineToCamel(String param) {
     public static String underlineToCamel(String param) {
-        if (isEmpty(param)) {
+        if (isBlank(param)) {
             return EMPTY;
             return EMPTY;
         }
         }
         String temp = param.toLowerCase();
         String temp = param.toLowerCase();
@@ -237,7 +237,7 @@ public final class StringUtils {
      * @return 转换好的字符串
      * @return 转换好的字符串
      */
      */
     public static String firstToLowerCase(String param) {
     public static String firstToLowerCase(String param) {
-        if (isEmpty(param)) {
+        if (isBlank(param)) {
             return EMPTY;
             return EMPTY;
         }
         }
         return param.substring(0, 1).toLowerCase() + param.substring(1);
         return param.substring(0, 1).toLowerCase() + param.substring(1);
@@ -268,7 +268,7 @@ public final class StringUtils {
      * @param args    填充参数
      * @param args    填充参数
      */
      */
     public static String sqlArgsFill(String content, Object... args) {
     public static String sqlArgsFill(String content, Object... args) {
-        if (StringUtils.isNotEmpty(content) && ArrayUtils.isNotEmpty(args)) {
+        if (StringUtils.isNotBlank(content) && ArrayUtils.isNotEmpty(args)) {
             // 索引不能使用,因为 SQL 中的占位符数字与索引不相同
             // 索引不能使用,因为 SQL 中的占位符数字与索引不相同
             BiIntFunction<Matcher, CharSequence> handler = (m, i) -> sqlParam(args[Integer.parseInt(m.group("idx"))]);
             BiIntFunction<Matcher, CharSequence> handler = (m, i) -> sqlParam(args[Integer.parseInt(m.group("idx"))]);
             return replace(content, MP_SQL_PLACE_HOLDER, handler).toString();
             return replace(content, MP_SQL_PLACE_HOLDER, handler).toString();
@@ -351,7 +351,7 @@ public final class StringUtils {
      * 拼接字符串第二个字符串第一个字母大写
      * 拼接字符串第二个字符串第一个字母大写
      */
      */
     public static String concatCapitalize(String concatStr, final String str) {
     public static String concatCapitalize(String concatStr, final String str) {
-        if (isEmpty(concatStr)) {
+        if (isBlank(concatStr)) {
             concatStr = EMPTY;
             concatStr = EMPTY;
         }
         }
         if (str == null || str.length() == 0) {
         if (str == null || str.length() == 0) {
@@ -375,7 +375,7 @@ public final class StringUtils {
      */
      */
     public static boolean checkValNotNull(Object object) {
     public static boolean checkValNotNull(Object object) {
         if (object instanceof CharSequence) {
         if (object instanceof CharSequence) {
-            return isNotEmpty((CharSequence) object);
+            return isNotBlank((CharSequence) object);
         }
         }
         return object != null;
         return object != null;
     }
     }
@@ -495,7 +495,7 @@ public final class StringUtils {
     public static String removeIsPrefixIfBoolean(String propertyName, Class<?> propertyType) {
     public static String removeIsPrefixIfBoolean(String propertyName, Class<?> propertyType) {
         if (ClassUtils.isBoolean(propertyType) && propertyName.startsWith(IS)) {
         if (ClassUtils.isBoolean(propertyType) && propertyName.startsWith(IS)) {
             String property = propertyName.replaceFirst(IS, EMPTY);
             String property = propertyName.replaceFirst(IS, EMPTY);
-            if (isEmpty(property)) {
+            if (isBlank(property)) {
                 return propertyName;
                 return propertyName;
             } else {
             } else {
                 String firstCharToLowerStr = firstCharToLower(property);
                 String firstCharToLowerStr = firstCharToLower(property);

+ 8 - 8
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/sql/SqlScriptUtils.java

@@ -63,16 +63,16 @@ public final class SqlScriptUtils implements Constants {
     public static String convertTrim(final String sqlScript, final String prefix, final String suffix,
     public static String convertTrim(final String sqlScript, final String prefix, final String suffix,
                                      final String prefixOverrides, final String suffixOverrides) {
                                      final String prefixOverrides, final String suffixOverrides) {
         StringBuilder sb = new StringBuilder("<trim");
         StringBuilder sb = new StringBuilder("<trim");
-        if (StringUtils.isNotEmpty(prefix)) {
+        if (StringUtils.isNotBlank(prefix)) {
             sb.append(" prefix=\"").append(prefix).append(QUOTE);
             sb.append(" prefix=\"").append(prefix).append(QUOTE);
         }
         }
-        if (StringUtils.isNotEmpty(suffix)) {
+        if (StringUtils.isNotBlank(suffix)) {
             sb.append(" suffix=\"").append(suffix).append(QUOTE);
             sb.append(" suffix=\"").append(suffix).append(QUOTE);
         }
         }
-        if (StringUtils.isNotEmpty(prefixOverrides)) {
+        if (StringUtils.isNotBlank(prefixOverrides)) {
             sb.append(" prefixOverrides=\"").append(prefixOverrides).append(QUOTE);
             sb.append(" prefixOverrides=\"").append(prefixOverrides).append(QUOTE);
         }
         }
-        if (StringUtils.isNotEmpty(suffixOverrides)) {
+        if (StringUtils.isNotBlank(suffixOverrides)) {
             sb.append(" suffixOverrides=\"").append(suffixOverrides).append(QUOTE);
             sb.append(" suffixOverrides=\"").append(suffixOverrides).append(QUOTE);
         }
         }
         return sb.append(RIGHT_CHEV).append(NEWLINE).append(sqlScript).append(NEWLINE).append("</trim>").toString();
         return sb.append(RIGHT_CHEV).append(NEWLINE).append(sqlScript).append(NEWLINE).append("</trim>").toString();
@@ -110,16 +110,16 @@ public final class SqlScriptUtils implements Constants {
     public static String convertForeach(final String sqlScript, final String collection, final String index,
     public static String convertForeach(final String sqlScript, final String collection, final String index,
                                         final String item, final String separator) {
                                         final String item, final String separator) {
         StringBuilder sb = new StringBuilder("<foreach");
         StringBuilder sb = new StringBuilder("<foreach");
-        if (StringUtils.isNotEmpty(collection)) {
+        if (StringUtils.isNotBlank(collection)) {
             sb.append(" collection=\"").append(collection).append(QUOTE);
             sb.append(" collection=\"").append(collection).append(QUOTE);
         }
         }
-        if (StringUtils.isNotEmpty(index)) {
+        if (StringUtils.isNotBlank(index)) {
             sb.append(" index=\"").append(index).append(QUOTE);
             sb.append(" index=\"").append(index).append(QUOTE);
         }
         }
-        if (StringUtils.isNotEmpty(item)) {
+        if (StringUtils.isNotBlank(item)) {
             sb.append(" item=\"").append(item).append(QUOTE);
             sb.append(" item=\"").append(item).append(QUOTE);
         }
         }
-        if (StringUtils.isNotEmpty(separator)) {
+        if (StringUtils.isNotBlank(separator)) {
             sb.append(" separator=\"").append(separator).append(QUOTE);
             sb.append(" separator=\"").append(separator).append(QUOTE);
         }
         }
         return sb.append(RIGHT_CHEV).append(NEWLINE).append(sqlScript).append(NEWLINE).append("</foreach>").toString();
         return sb.append(RIGHT_CHEV).append(NEWLINE).append(sqlScript).append(NEWLINE).append("</foreach>").toString();

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/injector/methods/additional/InsertBatchSomeColumn.java

@@ -88,7 +88,7 @@ public class InsertBatchSomeColumn extends AbstractMethod {
         String keyProperty = null;
         String keyProperty = null;
         String keyColumn = null;
         String keyColumn = null;
         // 表包含主键处理逻辑,如果不包含主键当普通字段处理
         // 表包含主键处理逻辑,如果不包含主键当普通字段处理
-        if (StringUtils.isNotEmpty(tableInfo.getKeyProperty())) {
+        if (StringUtils.isNotBlank(tableInfo.getKeyProperty())) {
             if (tableInfo.getIdType() == IdType.AUTO) {
             if (tableInfo.getIdType() == IdType.AUTO) {
                 /* 自增主键 */
                 /* 自增主键 */
                 keyGenerator = new Jdbc3KeyGenerator();
                 keyGenerator = new Jdbc3KeyGenerator();

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/p6spy/P6SpyLogger.java

@@ -31,7 +31,7 @@ public class P6SpyLogger implements MessageFormattingStrategy {
     @Override
     @Override
     public String formatMessage(int connectionId, String now, long elapsed, String category,
     public String formatMessage(int connectionId, String now, long elapsed, String category,
                                 String prepared, String sql, String url) {
                                 String prepared, String sql, String url) {
-        return StringUtils.isNotEmpty(sql) ? " Consume Time:" + elapsed + " ms " + now +
+        return StringUtils.isNotBlank(sql) ? " Consume Time:" + elapsed + " ms " + now +
             "\n Execute SQL:" + sql.replaceAll("[\\s]+", " ") + "\n" : null;
             "\n Execute SQL:" + sql.replaceAll("[\\s]+", " ") + "\n" : null;
     }
     }
 }
 }

+ 2 - 2
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/IllegalSQLInterceptor.java

@@ -260,7 +260,7 @@ public class IllegalSQLInterceptor implements Interceptor {
      */
      */
     public static List<IndexInfo> getIndexInfos(String key, String dbName, String tableName, Connection conn) {
     public static List<IndexInfo> getIndexInfos(String key, String dbName, String tableName, Connection conn) {
         List<IndexInfo> indexInfos = null;
         List<IndexInfo> indexInfos = null;
-        if (StringUtils.isNotEmpty(key)) {
+        if (StringUtils.isNotBlank(key)) {
             indexInfos = indexInfoMap.get(key);
             indexInfos = indexInfoMap.get(key);
         }
         }
         if (indexInfos == null || indexInfos.isEmpty()) {
         if (indexInfos == null || indexInfos.isEmpty()) {
@@ -279,7 +279,7 @@ public class IllegalSQLInterceptor implements Interceptor {
                         indexInfos.add(indexInfo);
                         indexInfos.add(indexInfo);
                     }
                     }
                 }
                 }
-                if (StringUtils.isNotEmpty(key)) {
+                if (StringUtils.isNotBlank(key)) {
                     indexInfoMap.put(key, indexInfos);
                     indexInfoMap.put(key, indexInfos);
                 }
                 }
             } catch (SQLException e) {
             } catch (SQLException e) {

+ 4 - 4
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/PaginationInterceptor.java

@@ -132,7 +132,7 @@ public class PaginationInterceptor extends AbstractSqlParserHandler implements I
     private static List<OrderByElement> addOrderByElements(List<OrderItem> orderList, List<OrderByElement> orderByElements) {
     private static List<OrderByElement> addOrderByElements(List<OrderItem> orderList, List<OrderByElement> orderByElements) {
         orderByElements = CollectionUtils.isEmpty(orderByElements) ? new ArrayList<>(orderList.size()) : orderByElements;
         orderByElements = CollectionUtils.isEmpty(orderByElements) ? new ArrayList<>(orderList.size()) : orderByElements;
         List<OrderByElement> orderByElementList = orderList.stream()
         List<OrderByElement> orderByElementList = orderList.stream()
-            .filter(item -> StringUtils.isNotEmpty(item.getColumn()))
+            .filter(item -> StringUtils.isNotBlank(item.getColumn()))
             .map(item -> {
             .map(item -> {
                 OrderByElement element = new OrderByElement();
                 OrderByElement element = new OrderByElement();
                 element.setExpression(new Column(item.getColumn()));
                 element.setExpression(new Column(item.getColumn()));
@@ -195,7 +195,7 @@ public class PaginationInterceptor extends AbstractSqlParserHandler implements I
 
 
         String originalSql = boundSql.getSql();
         String originalSql = boundSql.getSql();
         Connection connection = (Connection) invocation.getArgs()[0];
         Connection connection = (Connection) invocation.getArgs()[0];
-        DbType dbType = StringUtils.isNotEmpty(dialectType) ? DbType.getDbType(dialectType)
+        DbType dbType = StringUtils.isNotBlank(dialectType) ? DbType.getDbType(dialectType)
             : JdbcUtils.getDbType(connection.getMetaData().getURL());
             : JdbcUtils.getDbType(connection.getMetaData().getURL());
 
 
         if (page.isSearchCount()) {
         if (page.isSearchCount()) {
@@ -262,10 +262,10 @@ public class PaginationInterceptor extends AbstractSqlParserHandler implements I
     public void setProperties(Properties prop) {
     public void setProperties(Properties prop) {
         String dialectType = prop.getProperty("dialectType");
         String dialectType = prop.getProperty("dialectType");
         String dialectClazz = prop.getProperty("dialectClazz");
         String dialectClazz = prop.getProperty("dialectClazz");
-        if (StringUtils.isNotEmpty(dialectType)) {
+        if (StringUtils.isNotBlank(dialectType)) {
             this.dialectType = dialectType;
             this.dialectType = dialectType;
         }
         }
-        if (StringUtils.isNotEmpty(dialectClazz)) {
+        if (StringUtils.isNotBlank(dialectClazz)) {
             this.dialectClazz = dialectClazz;
             this.dialectClazz = dialectClazz;
         }
         }
     }
     }

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination/DialectFactory.java

@@ -65,7 +65,7 @@ public class DialectFactory {
     private static IDialect getDialect(DbType dbType, String dialectClazz) {
     private static IDialect getDialect(DbType dbType, String dialectClazz) {
         return DIALECT_CACHE.computeIfAbsent(dbType.getDb(), key -> {
         return DIALECT_CACHE.computeIfAbsent(dbType.getDb(), key -> {
             IDialect dialect = null;
             IDialect dialect = null;
-            String dialectClassName = StringUtils.isEmpty(dialectClazz) ? dbType.getDialect() : dialectClazz;
+            String dialectClassName = StringUtils.isBlank(dialectClazz) ? dbType.getDialect() : dialectClazz;
             try {
             try {
                 Class<?> clazz = Class.forName(dialectClassName);
                 Class<?> clazz = Class.forName(dialectClassName);
                 if (IDialect.class.isAssignableFrom(clazz)) {
                 if (IDialect.class.isAssignableFrom(clazz)) {

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination/dialects/SQLServer2005Dialect.java

@@ -56,7 +56,7 @@ public class SQLServer2005Dialect implements IDialect {
         pagingBuilder.append(sqlPartString);
         pagingBuilder.append(sqlPartString);
 
 
         // if no ORDER BY is specified use fake ORDER BY field to avoid errors
         // if no ORDER BY is specified use fake ORDER BY field to avoid errors
-        if (StringUtils.isEmpty(orderby)) {
+        if (StringUtils.isBlank(orderby)) {
             orderby = "ORDER BY CURRENT_TIMESTAMP";
             orderby = "ORDER BY CURRENT_TIMESTAMP";
         }
         }
         long firstParam = offset + 1;
         long firstParam = offset + 1;

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/toolkit/JdbcUtils.java

@@ -38,7 +38,7 @@ public class JdbcUtils {
      * @return ignore
      * @return ignore
      */
      */
     public static DbType getDbType(String jdbcUrl) {
     public static DbType getDbType(String jdbcUrl) {
-        Assert.isFalse(StringUtils.isEmpty(jdbcUrl), "Error: The jdbcUrl is Null, Cannot read database type");
+        Assert.isFalse(StringUtils.isBlank(jdbcUrl), "Error: The jdbcUrl is Null, Cannot read database type");
         if (jdbcUrl.contains(":mysql:") || jdbcUrl.contains(":cobar:")) {
         if (jdbcUrl.contains(":mysql:") || jdbcUrl.contains(":cobar:")) {
             return DbType.MYSQL;
             return DbType.MYSQL;
         } else if (jdbcUrl.contains(":mariadb:")) {
         } else if (jdbcUrl.contains(":mariadb:")) {

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/toolkit/VersionUtils.java

@@ -34,7 +34,7 @@ public class VersionUtils {
      * @return ignore
      * @return ignore
      */
      */
     public static int compareVersion(String version1, String version2) {
     public static int compareVersion(String version1, String version2) {
-        Assert.isTrue(!StringUtils.isEmpty(version1) && !StringUtils.isEmpty(version2),
+        Assert.isTrue(!StringUtils.isBlank(version1) && !StringUtils.isBlank(version2),
             "Error: CompareVersion Error: Illegal Argument !");
             "Error: CompareVersion Error: Illegal Argument !");
         // 切割点 ".";
         // 切割点 ".";
         String[] versionArray1 = version1.split("\\.");
         String[] versionArray1 = version1.split("\\.");

+ 1 - 1
mybatis-plus-extension/src/main/kotlin/com/baomidou/mybatisplus/extension/kotlin/KtUpdateWrapper.kt

@@ -65,7 +65,7 @@ class KtUpdateWrapper<T : Any> : AbstractKtWrapper<T, KtUpdateWrapper<T>>, Updat
     }
     }
 
 
     override fun setSql(condition: Boolean, sql: String): KtUpdateWrapper<T> {
     override fun setSql(condition: Boolean, sql: String): KtUpdateWrapper<T> {
-        if (condition && StringUtils.isNotEmpty(sql)) {
+        if (condition && StringUtils.isNotBlank(sql)) {
             sqlSet.add(sql)
             sqlSet.add(sql)
         }
         }
         return typedThis
         return typedThis

+ 2 - 2
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/AutoGenerator.java

@@ -146,12 +146,12 @@ public class AutoGenerator {
                 // 逻辑删除注解
                 // 逻辑删除注解
                 tableInfo.setImportPackages(TableLogic.class.getCanonicalName());
                 tableInfo.setImportPackages(TableLogic.class.getCanonicalName());
             }
             }
-            if (StringUtils.isNotEmpty(config.getStrategyConfig().getVersionFieldName())) {
+            if (StringUtils.isNotBlank(config.getStrategyConfig().getVersionFieldName())) {
                 // 乐观锁注解
                 // 乐观锁注解
                 tableInfo.setImportPackages(Version.class.getCanonicalName());
                 tableInfo.setImportPackages(Version.class.getCanonicalName());
             }
             }
             boolean importSerializable = true;
             boolean importSerializable = true;
-            if (StringUtils.isNotEmpty(config.getSuperEntityClass())) {
+            if (StringUtils.isNotBlank(config.getSuperEntityClass())) {
                 // 父实体
                 // 父实体
                 tableInfo.setImportPackages(config.getSuperEntityClass());
                 tableInfo.setImportPackages(config.getSuperEntityClass());
                 importSerializable = false;
                 importSerializable = false;

+ 1 - 1
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/PackageConfig.java

@@ -75,7 +75,7 @@ public class PackageConfig {
      * 父包名
      * 父包名
      */
      */
     public String getParent() {
     public String getParent() {
-        if (StringUtils.isNotEmpty(moduleName)) {
+        if (StringUtils.isNotBlank(moduleName)) {
             return parent + StringPool.DOT + moduleName;
             return parent + StringPool.DOT + moduleName;
         }
         }
         return parent;
         return parent;

+ 17 - 17
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/builder/ConfigBuilder.java

@@ -257,7 +257,7 @@ public class ConfigBuilder {
     }
     }
 
 
     private void setPathInfo(Map<String, String> pathInfo, String template, String outputDir, String path, String module) {
     private void setPathInfo(Map<String, String> pathInfo, String template, String outputDir, String path, String module) {
-        if (StringUtils.isNotEmpty(template)) {
+        if (StringUtils.isNotBlank(template)) {
             pathInfo.put(path, joinPath(outputDir, packageInfo.get(module)));
             pathInfo.put(path, joinPath(outputDir, packageInfo.get(module)));
         }
         }
     }
     }
@@ -290,17 +290,17 @@ public class ConfigBuilder {
      * @param config 策略配置
      * @param config 策略配置
      */
      */
     private void processTypes(StrategyConfig config) {
     private void processTypes(StrategyConfig config) {
-        if (StringUtils.isEmpty(config.getSuperServiceClass())) {
+        if (StringUtils.isBlank(config.getSuperServiceClass())) {
             superServiceClass = ConstVal.SUPER_SERVICE_CLASS;
             superServiceClass = ConstVal.SUPER_SERVICE_CLASS;
         } else {
         } else {
             superServiceClass = config.getSuperServiceClass();
             superServiceClass = config.getSuperServiceClass();
         }
         }
-        if (StringUtils.isEmpty(config.getSuperServiceImplClass())) {
+        if (StringUtils.isBlank(config.getSuperServiceImplClass())) {
             superServiceImplClass = ConstVal.SUPER_SERVICE_IMPL_CLASS;
             superServiceImplClass = ConstVal.SUPER_SERVICE_IMPL_CLASS;
         } else {
         } else {
             superServiceImplClass = config.getSuperServiceImplClass();
             superServiceImplClass = config.getSuperServiceImplClass();
         }
         }
-        if (StringUtils.isEmpty(config.getSuperMapperClass())) {
+        if (StringUtils.isBlank(config.getSuperMapperClass())) {
             superMapperClass = ConstVal.SUPER_MAPPER_CLASS;
             superMapperClass = ConstVal.SUPER_MAPPER_CLASS;
         } else {
         } else {
             superMapperClass = config.getSuperMapperClass();
             superMapperClass = config.getSuperMapperClass();
@@ -329,33 +329,33 @@ public class ConfigBuilder {
             } else {
             } else {
                 entityName = NamingStrategy.capitalFirst(processName(tableInfo.getName(), strategy, tablePrefix));
                 entityName = NamingStrategy.capitalFirst(processName(tableInfo.getName(), strategy, tablePrefix));
             }
             }
-            if (StringUtils.isNotEmpty(globalConfig.getEntityName())) {
+            if (StringUtils.isNotBlank(globalConfig.getEntityName())) {
                 tableInfo.setConvert(true);
                 tableInfo.setConvert(true);
                 tableInfo.setEntityName(String.format(globalConfig.getEntityName(), entityName));
                 tableInfo.setEntityName(String.format(globalConfig.getEntityName(), entityName));
             } else {
             } else {
                 tableInfo.setEntityName(strategyConfig, entityName);
                 tableInfo.setEntityName(strategyConfig, entityName);
             }
             }
-            if (StringUtils.isNotEmpty(globalConfig.getMapperName())) {
+            if (StringUtils.isNotBlank(globalConfig.getMapperName())) {
                 tableInfo.setMapperName(String.format(globalConfig.getMapperName(), entityName));
                 tableInfo.setMapperName(String.format(globalConfig.getMapperName(), entityName));
             } else {
             } else {
                 tableInfo.setMapperName(entityName + ConstVal.MAPPER);
                 tableInfo.setMapperName(entityName + ConstVal.MAPPER);
             }
             }
-            if (StringUtils.isNotEmpty(globalConfig.getXmlName())) {
+            if (StringUtils.isNotBlank(globalConfig.getXmlName())) {
                 tableInfo.setXmlName(String.format(globalConfig.getXmlName(), entityName));
                 tableInfo.setXmlName(String.format(globalConfig.getXmlName(), entityName));
             } else {
             } else {
                 tableInfo.setXmlName(entityName + ConstVal.MAPPER);
                 tableInfo.setXmlName(entityName + ConstVal.MAPPER);
             }
             }
-            if (StringUtils.isNotEmpty(globalConfig.getServiceName())) {
+            if (StringUtils.isNotBlank(globalConfig.getServiceName())) {
                 tableInfo.setServiceName(String.format(globalConfig.getServiceName(), entityName));
                 tableInfo.setServiceName(String.format(globalConfig.getServiceName(), entityName));
             } else {
             } else {
                 tableInfo.setServiceName("I" + entityName + ConstVal.SERVICE);
                 tableInfo.setServiceName("I" + entityName + ConstVal.SERVICE);
             }
             }
-            if (StringUtils.isNotEmpty(globalConfig.getServiceImplName())) {
+            if (StringUtils.isNotBlank(globalConfig.getServiceImplName())) {
                 tableInfo.setServiceImplName(String.format(globalConfig.getServiceImplName(), entityName));
                 tableInfo.setServiceImplName(String.format(globalConfig.getServiceImplName(), entityName));
             } else {
             } else {
                 tableInfo.setServiceImplName(entityName + ConstVal.SERVICE_IMPL);
                 tableInfo.setServiceImplName(entityName + ConstVal.SERVICE_IMPL);
             }
             }
-            if (StringUtils.isNotEmpty(globalConfig.getControllerName())) {
+            if (StringUtils.isNotBlank(globalConfig.getControllerName())) {
                 tableInfo.setControllerName(String.format(globalConfig.getControllerName(), entityName));
                 tableInfo.setControllerName(String.format(globalConfig.getControllerName(), entityName));
             } else {
             } else {
                 tableInfo.setControllerName(entityName + ConstVal.CONTROLLER);
                 tableInfo.setControllerName(entityName + ConstVal.CONTROLLER);
@@ -372,7 +372,7 @@ public class ConfigBuilder {
      * @param tableInfo ignore
      * @param tableInfo ignore
      */
      */
     private void checkImportPackages(TableInfo tableInfo) {
     private void checkImportPackages(TableInfo tableInfo) {
-        if (StringUtils.isNotEmpty(strategyConfig.getSuperEntityClass())) {
+        if (StringUtils.isNotBlank(strategyConfig.getSuperEntityClass())) {
             // 自定义父类
             // 自定义父类
             tableInfo.getImportPackages().add(strategyConfig.getSuperEntityClass());
             tableInfo.getImportPackages().add(strategyConfig.getSuperEntityClass());
         } else if (globalConfig.isActiveRecord()) {
         } else if (globalConfig.isActiveRecord()) {
@@ -384,7 +384,7 @@ public class ConfigBuilder {
             tableInfo.getImportPackages().add(com.baomidou.mybatisplus.annotation.IdType.class.getCanonicalName());
             tableInfo.getImportPackages().add(com.baomidou.mybatisplus.annotation.IdType.class.getCanonicalName());
             tableInfo.getImportPackages().add(com.baomidou.mybatisplus.annotation.TableId.class.getCanonicalName());
             tableInfo.getImportPackages().add(com.baomidou.mybatisplus.annotation.TableId.class.getCanonicalName());
         }
         }
-        if (StringUtils.isNotEmpty(strategyConfig.getVersionFieldName())
+        if (StringUtils.isNotBlank(strategyConfig.getVersionFieldName())
             && CollectionUtils.isNotEmpty(tableInfo.getFields())) {
             && CollectionUtils.isNotEmpty(tableInfo.getFields())) {
             tableInfo.getFields().forEach(f -> {
             tableInfo.getFields().forEach(f -> {
                 if (strategyConfig.getVersionFieldName().equals(f.getName())) {
                 if (strategyConfig.getVersionFieldName().equals(f.getName())) {
@@ -470,7 +470,7 @@ public class ConfigBuilder {
                  ResultSet results = preparedStatement.executeQuery()) {
                  ResultSet results = preparedStatement.executeQuery()) {
                 while (results.next()) {
                 while (results.next()) {
                     String tableName = results.getString(dbQuery.tableName());
                     String tableName = results.getString(dbQuery.tableName());
-                    if (StringUtils.isNotEmpty(tableName)) {
+                    if (StringUtils.isNotBlank(tableName)) {
                         tableInfo = new TableInfo();
                         tableInfo = new TableInfo();
                         tableInfo.setName(tableName);
                         tableInfo.setName(tableName);
 
 
@@ -601,9 +601,9 @@ public class ConfigBuilder {
                     } else {
                     } else {
                         String key = results.getString(dbQuery.fieldKey());
                         String key = results.getString(dbQuery.fieldKey());
                         if (DbType.DB2 == dbType || DbType.SQLITE == dbType) {
                         if (DbType.DB2 == dbType || DbType.SQLITE == dbType) {
-                            isId = StringUtils.isNotEmpty(key) && "1".equals(key);
+                            isId = StringUtils.isNotBlank(key) && "1".equals(key);
                         } else {
                         } else {
-                            isId = StringUtils.isNotEmpty(key) && "PRI".equals(key.toUpperCase());
+                            isId = StringUtils.isNotBlank(key) && "PRI".equals(key.toUpperCase());
                         }
                         }
                     }
                     }
 
 
@@ -671,7 +671,7 @@ public class ConfigBuilder {
      * @return 连接后的路径
      * @return 连接后的路径
      */
      */
     private String joinPath(String parentDir, String packageName) {
     private String joinPath(String parentDir, String packageName) {
-        if (StringUtils.isEmpty(parentDir)) {
+        if (StringUtils.isBlank(parentDir)) {
             parentDir = System.getProperty(ConstVal.JAVA_TMPDIR);
             parentDir = System.getProperty(ConstVal.JAVA_TMPDIR);
         }
         }
         if (!StringUtils.endsWith(parentDir, File.separator)) {
         if (!StringUtils.endsWith(parentDir, File.separator)) {
@@ -690,7 +690,7 @@ public class ConfigBuilder {
      * @return 连接后的包名
      * @return 连接后的包名
      */
      */
     private String joinPackage(String parent, String subPackage) {
     private String joinPackage(String parent, String subPackage) {
-        if (StringUtils.isEmpty(parent)) {
+        if (StringUtils.isBlank(parent)) {
             return subPackage;
             return subPackage;
         }
         }
         return parent + StringPool.DOT + subPackage;
         return parent + StringPool.DOT + subPackage;

+ 1 - 1
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/po/TableInfo.java

@@ -138,7 +138,7 @@ public class TableInfo {
      * 转换filed实体为 xml mapper 中的 base column 字符串信息
      * 转换filed实体为 xml mapper 中的 base column 字符串信息
      */
      */
     public String getFieldNames() {
     public String getFieldNames() {
-        if (StringUtils.isEmpty(fieldNames)
+        if (StringUtils.isBlank(fieldNames)
             && CollectionUtils.isNotEmpty(fields)) {
             && CollectionUtils.isNotEmpty(fields)) {
             StringBuilder names = new StringBuilder();
             StringBuilder names = new StringBuilder();
             IntStream.range(0, fields.size()).forEach(i -> {
             IntStream.range(0, fields.size()).forEach(i -> {

+ 5 - 5
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/rules/NamingStrategy.java

@@ -39,7 +39,7 @@ public enum NamingStrategy {
 
 
     public static String underlineToCamel(String name) {
     public static String underlineToCamel(String name) {
         // 快速检查
         // 快速检查
-        if (StringUtils.isEmpty(name)) {
+        if (StringUtils.isBlank(name)) {
             // 没必要转换
             // 没必要转换
             return StringPool.EMPTY;
             return StringPool.EMPTY;
         }
         }
@@ -53,7 +53,7 @@ public enum NamingStrategy {
         String[] camels = tempName.split(ConstVal.UNDERLINE);
         String[] camels = tempName.split(ConstVal.UNDERLINE);
         // 跳过原始字符串中开头、结尾的下换线或双重下划线
         // 跳过原始字符串中开头、结尾的下换线或双重下划线
         // 处理真正的驼峰片段
         // 处理真正的驼峰片段
-        Arrays.stream(camels).filter(camel -> !StringUtils.isEmpty(camel)).forEach(camel -> {
+        Arrays.stream(camels).filter(camel -> !StringUtils.isBlank(camel)).forEach(camel -> {
             if (result.length() == 0) {
             if (result.length() == 0) {
                 // 第一个驼峰片段,全部字母都小写
                 // 第一个驼峰片段,全部字母都小写
                 result.append(camel);
                 result.append(camel);
@@ -73,7 +73,7 @@ public enum NamingStrategy {
      * @return ignore
      * @return ignore
      */
      */
     public static String removePrefix(String name, String... prefix) {
     public static String removePrefix(String name, String... prefix) {
-        if (StringUtils.isEmpty(name)) {
+        if (StringUtils.isBlank(name)) {
             return StringPool.EMPTY;
             return StringPool.EMPTY;
         }
         }
         if (null != prefix) {
         if (null != prefix) {
@@ -94,7 +94,7 @@ public enum NamingStrategy {
      * @return ignore
      * @return ignore
      */
      */
     public static boolean isPrefixContained(String name, String... prefix) {
     public static boolean isPrefixContained(String name, String... prefix) {
-        if (null == prefix || StringUtils.isEmpty(name)) {
+        if (null == prefix || StringUtils.isBlank(name)) {
             return false;
             return false;
         }
         }
         return Arrays.stream(prefix).anyMatch(pf -> name.toLowerCase().matches(StringPool.HAT + pf.toLowerCase() + ".*"));
         return Arrays.stream(prefix).anyMatch(pf -> name.toLowerCase().matches(StringPool.HAT + pf.toLowerCase() + ".*"));
@@ -118,7 +118,7 @@ public enum NamingStrategy {
      * @return 转换后的字符串
      * @return 转换后的字符串
      */
      */
     public static String capitalFirst(String name) {
     public static String capitalFirst(String name) {
-        if (StringUtils.isNotEmpty(name)) {
+        if (StringUtils.isNotBlank(name)) {
             return name.substring(0, 1).toUpperCase() + name.substring(1);
             return name.substring(0, 1).toUpperCase() + name.substring(1);
         }
         }
         return StringPool.EMPTY;
         return StringPool.EMPTY;

+ 3 - 3
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/engine/AbstractTemplateEngine.java

@@ -166,7 +166,7 @@ public abstract class AbstractTemplateEngine {
     public void open() {
     public void open() {
         String outDir = getConfigBuilder().getGlobalConfig().getOutputDir();
         String outDir = getConfigBuilder().getGlobalConfig().getOutputDir();
         if (getConfigBuilder().getGlobalConfig().isOpen()
         if (getConfigBuilder().getGlobalConfig().isOpen()
-            && StringUtils.isNotEmpty(outDir)) {
+            && StringUtils.isNotBlank(outDir)) {
             try {
             try {
                 String osName = System.getProperty("os.name");
                 String osName = System.getProperty("os.name");
                 if (osName != null) {
                 if (osName != null) {
@@ -239,7 +239,7 @@ public abstract class AbstractTemplateEngine {
      * @return ignore
      * @return ignore
      */
      */
     private String verifyClassPacket(String classPacket) {
     private String verifyClassPacket(String classPacket) {
-        return StringUtils.isEmpty(classPacket) ? null : classPacket;
+        return StringUtils.isBlank(classPacket) ? null : classPacket;
     }
     }
 
 
     /**
     /**
@@ -249,7 +249,7 @@ public abstract class AbstractTemplateEngine {
      * @return ignore
      * @return ignore
      */
      */
     private String getSuperClassName(String classPath) {
     private String getSuperClassName(String classPath) {
-        if (StringUtils.isEmpty(classPath)) {
+        if (StringUtils.isBlank(classPath)) {
             return null;
             return null;
         }
         }
         return classPath.substring(classPath.lastIndexOf(StringPool.DOT) + 1);
         return classPath.substring(classPath.lastIndexOf(StringPool.DOT) + 1);

+ 1 - 1
mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/engine/VelocityTemplateEngine.java

@@ -59,7 +59,7 @@ public class VelocityTemplateEngine extends AbstractTemplateEngine {
 
 
     @Override
     @Override
     public void writer(Map<String, Object> objectMap, String templatePath, String outputFile) throws Exception {
     public void writer(Map<String, Object> objectMap, String templatePath, String outputFile) throws Exception {
-        if (StringUtils.isEmpty(templatePath)) {
+        if (StringUtils.isBlank(templatePath)) {
             return;
             return;
         }
         }
         Template template = velocityEngine.getTemplate(templatePath, ConstVal.UTF8);
         Template template = velocityEngine.getTemplate(templatePath, ConstVal.UTF8);

+ 1 - 1
mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/test/generator/DMGenerator.java

@@ -46,7 +46,7 @@ public class DMGenerator {
         System.out.println(help.toString());
         System.out.println(help.toString());
         if (scanner.hasNext()) {
         if (scanner.hasNext()) {
             String ipt = scanner.next();
             String ipt = scanner.next();
-            if (StringUtils.isNotEmpty(ipt)) {
+            if (StringUtils.isNotBlank(ipt)) {
                 return ipt;
                 return ipt;
             }
             }
         }
         }

+ 1 - 1
mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/test/generator/SqliteGeneratorTest.java

@@ -32,7 +32,7 @@ public class SqliteGeneratorTest {
         System.out.println(help.toString());
         System.out.println(help.toString());
         if (scanner.hasNext()) {
         if (scanner.hasNext()) {
             String ipt = scanner.next();
             String ipt = scanner.next();
-            if (StringUtils.isNotEmpty(ipt)) {
+            if (StringUtils.isNotBlank(ipt)) {
                 return ipt;
                 return ipt;
             }
             }
         }
         }

+ 3 - 3
mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/base/type/ListTypeHandler.java

@@ -49,7 +49,7 @@ public class ListTypeHandler extends BaseTypeHandler<List<?>> {
     @Override
     @Override
     public List<?> getNullableResult(ResultSet rs, String columnName) throws SQLException {
     public List<?> getNullableResult(ResultSet rs, String columnName) throws SQLException {
         String result = rs.getString(columnName);
         String result = rs.getString(columnName);
-        if (StringUtils.isNotEmpty(result)) {
+        if (StringUtils.isNotBlank(result)) {
             try {
             try {
                 return objectMapper.readValue(result, new TypeReference<List<String>>() {
                 return objectMapper.readValue(result, new TypeReference<List<String>>() {
                 });
                 });
@@ -63,7 +63,7 @@ public class ListTypeHandler extends BaseTypeHandler<List<?>> {
     @Override
     @Override
     public List<?> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
     public List<?> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
         String result = rs.getString(columnIndex);
         String result = rs.getString(columnIndex);
-        if (StringUtils.isNotEmpty(result)) {
+        if (StringUtils.isNotBlank(result)) {
             try {
             try {
                 return objectMapper.readValue(result, new TypeReference<List<String>>() {
                 return objectMapper.readValue(result, new TypeReference<List<String>>() {
                 });
                 });
@@ -77,7 +77,7 @@ public class ListTypeHandler extends BaseTypeHandler<List<?>> {
     @Override
     @Override
     public List<?> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
     public List<?> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
         String result = cs.getString(columnIndex);
         String result = cs.getString(columnIndex);
-        if (StringUtils.isNotEmpty(result)) {
+        if (StringUtils.isNotBlank(result)) {
             try {
             try {
                 return objectMapper.readValue(result, new TypeReference<List<String>>() {
                 return objectMapper.readValue(result, new TypeReference<List<String>>() {
                 });
                 });

+ 3 - 3
mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/base/type/MapTypeHandler.java

@@ -48,7 +48,7 @@ public class MapTypeHandler extends BaseTypeHandler<Map<?, ?>> {
     @Override
     @Override
     public Map<?, ?> getNullableResult(ResultSet rs, String columnName) throws SQLException {
     public Map<?, ?> getNullableResult(ResultSet rs, String columnName) throws SQLException {
         String result = rs.getString(columnName);
         String result = rs.getString(columnName);
-        if (StringUtils.isNotEmpty(result)) {
+        if (StringUtils.isNotBlank(result)) {
             try {
             try {
                 return objectMapper.readValue(result, Map.class);
                 return objectMapper.readValue(result, Map.class);
             } catch (IOException e) {
             } catch (IOException e) {
@@ -61,7 +61,7 @@ public class MapTypeHandler extends BaseTypeHandler<Map<?, ?>> {
     @Override
     @Override
     public Map<?, ?> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
     public Map<?, ?> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
         String result = rs.getString(columnIndex);
         String result = rs.getString(columnIndex);
-        if (StringUtils.isNotEmpty(result)) {
+        if (StringUtils.isNotBlank(result)) {
             try {
             try {
                 return objectMapper.readValue(result, Map.class);
                 return objectMapper.readValue(result, Map.class);
             } catch (IOException e) {
             } catch (IOException e) {
@@ -74,7 +74,7 @@ public class MapTypeHandler extends BaseTypeHandler<Map<?, ?>> {
     @Override
     @Override
     public Map<?, ?> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
     public Map<?, ?> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
         String result = cs.getString(columnIndex);
         String result = cs.getString(columnIndex);
-        if (StringUtils.isNotEmpty(result)) {
+        if (StringUtils.isNotBlank(result)) {
             try {
             try {
                 return objectMapper.readValue(result, Map.class);
                 return objectMapper.readValue(result, Map.class);
             } catch (IOException e) {
             } catch (IOException e) {

+ 4 - 4
mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/toolkit/StringUtilsTest.java

@@ -13,12 +13,12 @@ import org.junit.jupiter.api.Test;
 class StringUtilsTest {
 class StringUtilsTest {
 
 
     @Test
     @Test
-    void isEmptyTest() {
-        Assert.isTrue(StringUtils.isEmpty(""), "error not empty");
+    void isBlankTest() {
+        Assert.isTrue(StringUtils.isBlank(""), "error not empty");
 
 
-        Assert.isTrue(StringUtils.isEmpty(null), "error not empty");
+        Assert.isTrue(StringUtils.isBlank(null), "error not empty");
 
 
-        Assert.isTrue(StringUtils.isEmpty("   "), "error not empty");
+        Assert.isTrue(StringUtils.isBlank("   "), "error not empty");
     }
     }
 
 
 }
 }