在eclipse中点击Window—>Preferences—>java—>Code Style—>CodeTemplates—>Comments
Files 文件
/**
* @Title: ${file_name}
* @Description:
* @author caoh
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
Types 类
/**
* @ClassName: ${type_name}
* @Description:
* @author caoh
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
Fields 字段
/**
* @Fields ${field} :
* @author caoh
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
Constructors 构造方法
/**
* @Constructor: ${enclosing_type}
* @Description: ${enclosing_type}构造函数
* @author caoh
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
Methods 方法
/**
* @MethodName: ${enclosing_method}
* @Description:
* @author caoh
* ${tags} ${return_type}
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
Overriding methods 重写方法
/**
* @MethodName: ${enclosing_method}
* @Description:
* @author caoh
* ${tags}
* ${see_to_overridden}
* @date ${currentDate:date('yyyy-MM-dd hh:mm:ss')}
*/
最终效果