When creating a Java class in idea, automatically add the author and creation time to the file header

Main path File | Settings | Editor | File and Code Templates

Find Settings in File

Insert picture description here

Find File and Code Templates and click on Includes

Insert picture description here

Add the following text in the right half

${DATE} must be capitalized to get the time

/**
 * @author : 作者名
 * @date  ${DATE} ${TIME}
 * @version 1.0
 */

Insert picture description here
The effect is as follows
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43850343/article/details/112632246