背景
每次创建class、interface都需要手动写重复的注释,特繁琐重复操作,我通过创建自己的注释模版自动生成提高了工作效率。
模板方式步骤
图一
创建新建文件的时候自动生成模版代码
/**
* @author ${USER}
* @since 1.0.0
*/
图二
手动输入/*+回车键自动生成
勾选在什么文件下使用生效
其他
官方描述内容可采用预定义变量取值
Predefined variables will take the following values:
${PACKAGE_NAME}
name of the package in which the new class is created
${NAME}
name of the new class specified by you in the Create New Class dialog
${USER}
current user system login name
${DATE}
current system date
${TIME}
current system time
${YEAR}
current year
${MONTH}
current month
${MONTH_NAME_SHORT}
first 3 letters of the current month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL}
full name of the current month. Example: January, February, etc.
${DAY}
current day of the month
${HOUR}
current hour
${MINUTE}
current minute
${PROJECT_NAME}