Idea basic operation 01: Set class and method annotation template

1. Class annotation template

① ctrl + alt + s Enter the following page under setting:
Insert picture description here
②Set the comment format as follows, click ok:
/ **

  • @Author: ghity
  • @Date: ${DATE} ${TIME}
  • ${PACKAGE_NAME}
  • $ {PROJECT_NAME}
    * /
    ③ The effect of the generated class is as follows:
    Insert picture description here

2. Method annotation template

① ctrl + alt + s Enter setting, click the + sign on the right to generate template group yc, and generate template cctm under yc.
Insert picture description here
② The set template text is as follows:

 /**
  • @author ghity
    p a r a m s params
  • @return r e t u r n return
  • @year y e a r year
  • @month m o n t h month
  • @date d a t e date t i m e time
  • @Descreption:
    * / ③Select
    define to check java, then edit the variables:
    Insert picture description here
    fill in the default values ​​and tick, the default value of params is:

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())

④ Inside the method, after entering cctm + enter, the effect is as follows:
Insert picture description here
Reference article 1: https://zhuanlan.zhihu.com/p/65802941
Reference article 2: https://blog.csdn.net/u013412790/article/details / 52807102

Published 4 original articles · Likes2 · Visits 199

Guess you like

Origin blog.csdn.net/ghity123/article/details/105443765