[ 类注释 ] 创建接口、类、注解类、枚举类自动生成文档注释
• 类注释模板一(推荐)
/**
*${NAME}
*
*@Author: ${USER}
*@CreateTime: ${YEAR}-${MONTH}-${DAY}
*/
• 类注释模板二
/**
* Created by ${USER} on ${YEAR}/${MONTH}/${DAY}
*/
• 设置步骤:顶部工具栏 File => Other Settins => Structure for New Project => Editor => File and Code Templates
[ 方法注释 ] 每次创建方法,使用 /** + Enter 生成方法注释
• 不设置,直接使用默认的方法注释 /** + Enter 生成 默认的就已经很好了
• 自定义设置:顶部工具栏 File => Settings => Editor => Live Templates
注意:第一行不要改成 /**
*
* @Author $USER$
* @Description: $description$
* @Date: $time$ $date$
* @Param $param$
* @return $returns$
*/
user()
time()
date()
methodParameters()
methodReturnType()
最终效果:
[ 设置作者信息 ]
找到安装目录 => bin => 打开 idea.exe.vmoptions 和 idea64.exe.vmoptions => 新建一行,添加下面代码 => 重启
-Duser.name=作者名