效果:
类模板
/**
* @ClassName: ${NAME}
* @Description: TODO
* @Date: ${DATE} ${TIME}
* @author vioking
* @version V1.0
*/
方法模板
/** * @Description TODO * @Author dongjd * @Date $date$ $time$ $param$ * @Return $return$ */
params:
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());
参考资料:Intellij idea liveTemplate 方法注释之params,return参数自动获取:https://blog.csdn.net/qqqq0199181/article/details/80889603