前言

    IDEA默认的注释模板有时不符合自己的业务需求,那就需要自定义模板,下面就由介绍下在IDEA中如何配置注释模板。

第一步

按Ctrl + Alt + S ,找到 Editor-->Live Templates

IDEA配置注释模板(新测)

第二步

点击右边的加号+ ,选择  new template group ,然后输入自定义的模板名称,点击确定。

IDEA配置注释模板(新测)

第三步

选中刚刚定义的模板,然后点击右边的加号 + ,选择 new live template,然后输入 * 。

IDEA配置注释模板(新测)

第四步

在template text 中输入模板内容。

*
 * @Author Daniel
 * @Description //TODO $end$
 * @Date $time$ $date$
 * @Param $param$
 * @return $return$
 **/

第五步

在上方的 by default expand with 这里选择 Enter

IDEA配置注释模板(新测)

 

第六步

在右下方的 edits varibles 中配置模板的参数

IDEA配置注释模板(新测)

第七步

点击右下方面的 apply ,再点击 ok 按钮。

IDEA配置注释模板(新测)

 

接下就是见证奇迹的时刻了,效果如下

IDEA配置注释模板(新测)

 

更多精彩技术分享请浏览本人博客:https://blog.csdn.net/wohiusdashi

 

 

 

 

 

相关文章:

  • 2021-10-12
  • 2021-11-02
  • 2021-04-14
  • 2022-12-23
猜你喜欢
  • 2021-11-22
  • 2021-05-22
  • 2021-07-04
  • 2021-07-15
  • 2021-04-12
  • 2022-01-26
  • 2021-12-14
相关资源
相似解决方案