How to set File Header and custom class and method annotation templates in IDEA


1 Set File Header

File -> Settings -> File and Code Templates -> Includes -> File Header -> 编辑
Insert image description here

2 Custom class and method annotations

File -> Settings -> Live Templates -> 编辑
Insert image description here

Generate class annotation template

/**
* @program: ${PROJECT_NAME}
*
* @description: ${description}
*
* @author: TangMonk
*
* @create: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
**/

Generate method annotation template

** 
* @Description: $description$ 
* @Param: $params$ 
* @return: $returns$ 
* @Author: Mr.Wang 
* @Date: $date$ 
*/ 

Guess you like

Origin blog.csdn.net/qq_58647634/article/details/134466217