idea创建JAVA Class时自动生成头部文档注释
程序员文章站
2022-06-17 17:28:02
...
IDEA设置文档注释模板
创建Class文件时自动生成的头部注释如图
如何配置idea的头部注释格式,可以生成像之前的注释格式一样的文档注释?
File->settings->Editor->File and Code Templates->Files->Class
原先模板
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}
修改后模板
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
/**
\* Created with IntelliJ IDEA.
\* @author: xiyue
\* Date: ${DATE}
\* Time: ${TIME}
\* To change this template use File | Settings | File Templates.
\* Description:
\*/
public class ${NAME} {
}