eclipse 新建 java 文件时自动生成注释

Windows->Preference->Java->Code Style->Code Templates->Code->New Java file->Edit

 

原来的模板:

${filecomment}
${package_declaration}


${typecomment}
${type_declaration}

修改后:

${filecomment}
${package_declaration}

/** 
* @author YJJ
* @version ${date} ${time}
*/ 
${typecomment}
${type_declaration}

添加了作者,文件生成时间

原文地址:https://www.cnblogs.com/yanjj/p/7832321.html