IDEA-JavaDOC插件模板

2021-02-01  本文已影响0人  qubor
  1. 类模板
^.*(public|protected|private)*.+class\s+\w+Controller.*

/**\n
 * 类释义——控制层\n
 * @author qub\n
 * @since ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 */
^.*(public|protected|private)*.+class\s+\w+Service.*

/**\n
 * 类释义——业务层\n
 * @author qub\n
 * @since ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 */
^.*(public|protected|private)*.+interface\s+\w+Repo.*

/**\n
 * 类释义——持久层\n
 * @author qub\n
 * @since ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 */
^.*(public|protected|private)*.+class\s+\w+Entity.*

/**\n
 * 类释义——实体层\n
 * @author qub\n
 * @since ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 */

2.方法模板

.+
/**\n
 * ${name} 函数释义.\n
 * \n
<#if element.typeParameters?has_content>         * \n
</#if>
<#list element.typeParameters as typeParameter>
         * @param <${typeParameter.name}> the type parameter\n
</#list>
<#if element.parameterList.parameters?has_content>
         *\n
</#if>
<#list element.parameterList.parameters as parameter>
         * @param ${parameter.name} 入参释义\n
</#list>
     
<#if isNotVoid>
         *\n
         * @return {@link ${element.returnType.name}} 出参释义\n
</#if>
<#if element.throwsList.referenceElements?has_content>
         *\n
</#if>
<#list element.throwsList.referenceElements as exception>
         * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
</#list>
         * @author qub\n
         * @since ${.now?string("yyyy-MM-dd HH:mm:ss")}
 */
上一篇 下一篇

猜你喜欢

热点阅读