一、打開設置選擇File | Settings | Editor | Live Templates設置注釋快捷鍵

image.png
1、設置pf快捷鍵,代表包注釋:
/**
* Copyright (C) 2013 SHANGHAI VOLKSWAGEN, All rights reserved.
* License version 1.0, a copy of which has been included with this.
* @File name:$PACKAGE_NAME$.$NAME$
* @Create on:$DATE$
* @Author:hkl
*/
設置參數(shù):

image.png
2、設置cf快捷鍵,代表類注釋:
/**
* <p>ClassName:$NAME$</p >
* <p>Description:</p >
* <p>Author:hkl</p >
* <p>Date:$DATE$</p >
*/
3、設置mf快捷鍵,代表方法注釋:
/**
* <p></p >
* @author:hkl
* @date:$date$ $time$
* @param:$param$
* @return:$return$
*/
4、設置af快捷鍵,代表屬性注釋:
/**
* <p>Field:</p >
*/
二、設置新建類自動帶出包注釋和類注釋
1、打開設置選擇File | Settings | Editor | File and Code Templates路徑

image.png
在files頁簽中選class,配置如下代碼:
/**
* Copyright (C) 2013 SHANGHAI VOLKSWAGEN, All rights reserved.
* License version 1.0, a copy of which has been included with this.
* @File name:${PACKAGE_NAME}.${NAME}
* @Create on:${DATE}
* @Author:hkl
*/
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}

image.png
2、在includes頁簽中選擇file header配置如下代碼Ok即可:
/**
* <p>ClassName:${NAME}</p >
* <p>Description:</p >
* <p>Author:hkl</p >
* <p>Date:${DATE}</p >
*/