左上角file>Settings>Editor>Live Templates
点击右边加号选择2.
随便输入一个名字,这里我写的是MyAnnotation
选中出创建的MyAnnotation,点击加号选择1.
按下面图片顺序填写
Template text模板↓,注意开头不是/**,这不是写错是为了防止@Param和@Return显示null
**
* @Description: $description$
* @Author: $author$
* @Date: $date$ $time$
* @Param: $param$
* @Return: $return$
*/
点击第5步按钮后,再根据下图选择填写
在方法上输入/**, 然后按回车
最终效果: