idea-配置类注解和方法

一、设置类注解模板(在创建类的时候自动填充模板)

在这里插入图片描述

/** 
 * @ProjectName: ${PROJECT_NAME} 
 * @Package: ${PACKAGE_NAME} 
 * @ClassName: ${NAME} 
 * @Author: ${USER} 
 * @Description: ${description} 
 * @Date: ${DATE} ${TIME} 
 * @Version: 1.0 
 */

二、设置方法注解模板

添加groupMyGroup
在这里插入图片描述
添加Live Template add comments for method
在这里插入图片描述
Abbreviation : *
Description : `add comments for method``
在这里插入图片描述
Template text 填入内容:

*
* @description
$param$
* @return      
* @exception   $exception$
* @author      choiyubo
* @date        $date$ $time$
**/

Edit variables 编辑参数
参数内容

param:

	groovyScript("if(\"${_1}\".length() == 2) {return '';} else {def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList();for(i = 0; i < params.size(); i++) {if(i<(params.size()-1)){result+='* @param ' + params[i] + ' : ' + '\\n'}else{result+='* @param ' + params[i] + ' : '}}; return result;}", methodParameters()); 

exception:

expressionType(Expression)

在这里插入图片描述

选着文件类型:
在这里插入图片描述

参考

https://blog.csdn.net/dongxiexie/article/details/94999540

发布了36 篇原创文章 · 获赞 3 · 访问量 2911

猜你喜欢

转载自blog.csdn.net/weixin_39836585/article/details/104859721
今日推荐