##引入宏定义
$!define
##使用宏定义设置回调(保存位置与文件后缀)
!
c
a
l
l
b
a
c
k
.
s
e
t
F
i
l
e
N
a
m
e
(
!callback.setFileName(
!callback.setFileName(tool.append($!{tableInfo.name}, “.java”))
!
c
a
l
l
b
a
c
k
.
s
e
t
S
a
v
e
P
a
t
h
(
!callback.setSavePath(
!callback.setSavePath(tool.append(KaTeX parse error: Expected 'EOF', got '#' at position 27: …avePath, "/")) #̲if(tableInfo.savePackageName)package $!{tableInfo.savePackageName}#{end};
##使用宏定义设置包后缀
##使用全局变量实现默认包导入
$!autoImport
import java.io.Serializable;
import javax.persistence.*;
/**
@Description ! t a b l e I n f o . c o m m e n t ( !{tableInfo.comment}( !tableInfo.comment(!{tableInfo.name})实体类
@author 作者
@CreateDate
!
t
i
m
e
.
c
u
r
r
T
i
m
e
(
)
∗
/
@
E
n
t
i
t
y
@
T
a
b
l
e
(
n
a
m
e
=
"
!time.currTime() */ @Entity @Table(name = "
!time.currTime()∗/@Entity@Table(name="!{tableInfo.obj.getName()}",schema = “tianhong”)
public class $!{tableInfo.name} implements Serializable {
private static final long serialVersionUID = KaTeX parse error: Expected 'EOF', got '#' at position 17: …tool.serial(); #̲foreach(column in KaTeX parse error: Expected 'EOF', got '#' at position 23: …fo.fullColumn) #̲if({column.comment})
/**
KaTeX parse error: Expected 'EOF', got '#' at position 20: …umn.comment} #̲end */ #if({velocityCount} == 1)
@Id
@Column(name = “KaTeX parse error: Expected 'EOF', got '#' at position 76: …Type.IDENTITY) #̲else @Column(na…column.obj.getName()”)
#end
@Basic
private KaTeX parse error: Expected '}', got 'EOF' at end of input: …NameByFullName(column.type)} $!{column.name};
#end
#foreach($column in KaTeX parse error: Expected 'EOF', got '#' at position 23: …fo.fullColumn) #̲#使用宏定义实现get,set…column)
#end
}