IDEA custom JAVA annotation template

1、File—Setting—Editor—Live Templates

Click the + sign on the right, select the second item, and enter a name, such as JavaDoc
Insert image description here
Insert image description here

2. Select the JavaDoc you just added, click the + sign again, select the first one, and give it a name, such as /**

Insert image description here

Insert image description here

3. Add a template in Template text

Insert image description here
For example, the following template, the content can be customized

/**
 *
 *@date $date$ $time$
 *@param $param$
 *@return $return$
 *@author zxj
 */

4. Edit template parameters

Insert image description here
Fill in the following content. If the last column is not checked, a red box will appear and
Insert image description here
select enter . In this case, enter /** on the method and press Enter to use this template.
Insert image description here
Finally, click Apply.

final effect

Insert image description here

Guess you like

Origin blog.csdn.net/qq_42042158/article/details/121680672