Skip to content

Commit

Permalink
代码生成器import jakarta.persistence.*
Browse files Browse the repository at this point in the history
  • Loading branch information
abel533 committed Aug 22, 2024
1 parent e37847a commit 0c52b2f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public boolean clientGenerated(Interface interfaze, IntrospectedTable introspect
*/
private void processEntityClass(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
//引入JPA注解
topLevelClass.addImportedType("javax.persistence.*");
topLevelClass.addImportedType("jakarta.persistence.*");
//lombok扩展开始
//如果需要Data,引入包,代码增加注解
if (this.needsData) {
Expand Down
2 changes: 1 addition & 1 deletion generator/src/main/resources/generator/test-all.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ${dateTime?string["yyyy-MM-dd HH:mm:ss"]}
****************************************************************************************
实体和表的信息:
表名:${tableClass.tableName}
表注释:${tableClass.remarks}
表注释:${tableClass.remarks!""}
变量名:${tableClass.variableName}
小写名:${tableClass.lowerCaseName}
类名:${tableClass.shortClassName}
Expand Down
2 changes: 1 addition & 1 deletion generator/src/main/resources/generator/test-one.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ${dateTime?string["yyyy-MM-dd HH:mm:ss"]}

实体和表的信息:
表名:${tableClass.tableName}
表注释:${tableClass.remarks}
表注释:${tableClass.remarks!""}
变量名:${tableClass.variableName}
小写名:${tableClass.lowerCaseName}
类名:${tableClass.shortClassName}
Expand Down
2 changes: 1 addition & 1 deletion generator/src/test/resources/generatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<!--使用Data注解时,Getter,Setter,ToString,EqualsAndHashCode注解无效-->
<!--<property name="lombok" value="Data,Accessors"/>-->
<property name="lombok" value="Getter,Setter,ToString,Accessors,EqualsAndHashCode"/>
<property name="lombokEqualsAndHashCodeCallSuper" value="true"/>
<property name="lombokEqualsAndHashCodeCallSuper" value="false"/>
<property name="swagger" value="true"/>
</plugin>

Expand Down

0 comments on commit 0c52b2f

Please sign in to comment.