Browse Source

修复自定义TypeHandler处理xml解析异常问题

woody 8 months ago
parent
commit
90497de547

+ 3 - 0
framework-database/src/main/java/com/chelvc/framework/database/config/TypeHandlerConfigurer.java

@@ -523,6 +523,9 @@ public class TypeHandlerConfigurer extends MybatisConfigurer {
                 Set<String> properties = Sets.newHashSet();
                 Set<String> properties = Sets.newHashSet();
                 for (XNode child : map.getChildren()) {
                 for (XNode child : map.getChildren()) {
                     String property = child.getStringAttribute("property");
                     String property = child.getStringAttribute("property");
+                    if (StringUtils.isEmpty(property)) {
+                        continue;
+                    }
                     properties.add(property);
                     properties.add(property);
                     if ("id".equalsIgnoreCase(child.getName())) {
                     if ("id".equalsIgnoreCase(child.getName())) {
                         continue;
                         continue;