Răsfoiți Sursa

代码优化

hubin 1 an în urmă
părinte
comite
37c16e49a5

+ 2 - 3
aizuda-generator/src/main/java/com/aizuda/generator/CodeTemplateEngine.java

@@ -29,8 +29,7 @@ public class CodeTemplateEngine extends VelocityTemplateEngine {
 
     @Override
     public AbstractTemplateEngine batchOutput() {
-        this.getConfigBuilder().getTableInfoList().forEach(tableInfo ->
-                this.validationAnnotations(tableInfo));
+        this.getConfigBuilder().getTableInfoList().forEach(this::validationAnnotations);
         return super.batchOutput();
     }
 
@@ -41,7 +40,7 @@ public class CodeTemplateEngine extends VelocityTemplateEngine {
             final String lt = "\t";
             final String lnt = "\n\t";
             final JdbcType jdbcType = metaInfo.getJdbcType();
-            StringBuffer annotations = new StringBuffer();
+            StringBuilder annotations = new StringBuilder();
             boolean tabLine = false;
             if (!metaInfo.isNullable()) {
                 annotations.append(lt);