一、类注解设置
/**
* @ProjectName: ${PROJECT_NAME}
* @Package: ${PACKAGE_NAME}
* @ClassName: ${NAME}
* @author: Feike
* @description: ${description}
* @date: ${DATE} ${TIME}
* @version: 1.0
*/
二、类注释
新建MyGroup ,再建 *
*
* @method $method$
* @author Feike
* @version 1.0
* @description
$param$
* @return $return$
* @exception $exception$
* @date $date$ $time$
*/
其中param expression的值:
groovyScript("def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+='* @param ' + params[i] + ((i < params.size() - 1) ? '\\r\\n ' : '')}; return result", methodParameters())groovyScript("def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+='* @param ' + params[i] + ((i < params.size() - 1) ? '\\n\\b' : '')}; return result", methodParameters())
三、生成javaDoc文档
-tag exception:a:"异常" -tag return:a:"返回值" -tag method:a:"方法" -tag version:a:"版本" -tag author:a:"作者" -tag ClassName:a:"类名" -tag Package:a:"包名" -tag date:a:"日期" -tag ProjectName:a:"项目名" -tag description:a:"功能描述" -encoding UTF-8 -charset UTF-8
效果图:
|