Eclipse设置代码模板Code Template

  • 团队协做最好是使用相同的代码模板 Code Template,打开 Window -> Preference -> Java -> Code Style -> Code Template,而后展开 Comments 节点下的 Types 进行编辑(通常须要编辑该 Java 类的代码模板)。
  • 编辑 Code Template 以下
/**
 * @Description: ${todo}(这里用一句话描述这个类的做用)
 * @author ${user}
 * @since JDK 1.8
 * @version V1.0
 * Date:${date} ${time}
 * Copyright (c) ${year}, 89757@qq.com All Rights Reserved. 
 * ${tags}
 */
  • 修改后的 Code Template 以下
/**
 * Hello World
 * @author Administrator
 * @since JDK 1.8
 * @version V1.0
 * Date:2019年5月30日 下午11:11:11
 * Copyright (c) 2019, 89757@qq.com All Rights Reserved.
 */
public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
相关文章
相关标签/搜索