效果如圖:
設置要在下面中:
Window->Preferences->Java->Code Style->Code Templates
下Comments中是配置各部分的注釋內容,Code中是配置是否使用這些注釋,
比如:Comments中Files是配置類的開頭處的注釋內容,如:
/**
* CopyRight(c) 2017 YCKJ. All Rights Reserved
*/
Types是配置類名稱上的注釋內容,如:
/**
* 描述:
* @author ${user}
* @date ${date}
*
*/
user是當前用戶信息,date是當前日期
Code里面主要看New Java Files中的信息:
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
filecomment對應Comments中的Files,typecomment對應Types。