|
@@ -47,17 +47,17 @@ public class CodeTemplateEngine extends VelocityTemplateEngine {
|
|
|
annotations.append(lt);
|
|
|
if (JdbcType.VARCHAR == jdbcType) {
|
|
|
annotations.append("@NotBlank(groups = Create.class)");
|
|
|
- tableInfo.addImportPackages("javax.validation.constraints.NotBlank");
|
|
|
+ tableInfo.addImportPackages("jakarta.validation.constraints.NotBlank");
|
|
|
} else {
|
|
|
annotations.append("@NotNull(groups = Create.class)");
|
|
|
- tableInfo.addImportPackages("javax.validation.constraints.NotNull");
|
|
|
+ tableInfo.addImportPackages("jakarta.validation.constraints.NotNull");
|
|
|
}
|
|
|
tabLine = true;
|
|
|
}
|
|
|
if (JdbcType.VARCHAR == jdbcType) {
|
|
|
annotations.append(tabLine ? lnt : lt);
|
|
|
annotations.append("@Size(max = ").append(metaInfo.getLength()).append(")");
|
|
|
- tableInfo.addImportPackages("javax.validation.constraints.Size");
|
|
|
+ tableInfo.addImportPackages("jakarta.validation.constraints.Size");
|
|
|
} else if (JdbcType.BIGINT == jdbcType
|
|
|
|| JdbcType.INTEGER == jdbcType
|
|
|
|| JdbcType.TINYINT == jdbcType
|
|
@@ -68,8 +68,7 @@ public class CodeTemplateEngine extends VelocityTemplateEngine {
|
|
|
|| JdbcType.DECIMAL == jdbcType) {
|
|
|
annotations.append(tabLine ? lnt : lt);
|
|
|
annotations.append("@PositiveOrZero");
|
|
|
- tableInfo.addImportPackages("javax.validation.constraints.PositiveOrZero");
|
|
|
- tableInfo.addImportPackages("com.aizuda.core.validation.Update");
|
|
|
+ tableInfo.addImportPackages("jakarta.validation.constraints.PositiveOrZero");
|
|
|
}
|
|
|
Map<String, Object> customMap = tableField.getCustomMap();
|
|
|
if (MapUtils.isEmpty(customMap)) {
|