设置类注释
步骤 file->settings->Editor->Fole and Code Templates->Includes ![](https://oscimg.oschina.net/oscnet/6aef55770614ce6f37e2079ac64af4ce528.jpg)
/**
*
* @ProjectName: ${PROJECT_NAME}
* @ClassName: ${NAME}
* @Description: TODO(一句话描述该类的功能)
* @Author: ${USER}
* @Date: ${DATE} ${TIME}
* @version v1.0
*
*/
下方Description内有详细参数的格式,需要多增加可自行添加
${PACKAGE_NAME}
name of the package in which the new file is created
${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
${DAY_NAME_SHORT}
first 3 letters of the current day name. Example: Mon, Tue, etc.
${DAY_NAME_FULL}
full name of the current day. Example: Monday, Tuesday, etc.
${HOUR}
current hour
${MINUTE}
current minute
${PROJECT_NAME}
the name of the current project
效果图
方法注释
步骤 file->settings->Editor->Live Templates
/**
* @Title: $enclosing_method$
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param $tags$
* @return @return $return_type$
* @author $user$
* @throws
* @date $date$ $time$
*/
效果图