Editor->File and Code Templates->Files 里找到 Java 的 Class,修改模板:

1
2
3
4
5
6
7
8
9
10
11
12
13
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

#set($name = ${NAME})
#if($name.toString().matches(".*[(V|P|B|DT)O|Query]"))
#set($obj = true)
#end
#if($obj)
import java.io.Serializable;
#end
#parse("File Header.java")
public class ${NAME} #if($obj)implements Serializable #end{
}

其中的 #parse("File Header.java") 是在 Editor->File and Code Templates->Includes 中添加的自定义的类注释:

1
2
3
4
/**
* @author xxx
* @date ${DATE}
*/