1. 设置新JAVA文件的默认文件头
1)设置@{user}用户名
在ecplise.ini 中的 -vmargs 下面 添加 -Duser.name=authorName, e.g:
-Duser.name=karl
2)设置默认头信息,保护作者和日期
打开eclipse的Windows-Preferences-Java-Code Style-Code Templates
选择Code--New Java files,进行 Edit, 添加如下信息
/*
* @author : ${user}
* @creation : ${date} ${time}
* @description :
*
*/
3) 设置Java Method 头
选择Code--Method body进行编辑,添加如下信息
/*
* @author : ${user}
* @creation : ${date} ${time}
* @function :
*
*/
4) 设置默认编码
3. 设置JSP文件默认编码和头
1) 默认添加的文件头
/*
* @author : ${user}
* @creation : ${date} ${time}
* @description :
*
*/
2) 默认编码
打开 MyEclipse--Files and Editors--JSP 设置成utf-8
打开 General--Editors--Spelling , 设置Encoding 为 UTF-8