IDEA JAVA模板定义

2、Settings->File and Code Templates

Files标签下
Class修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${
    
    PACKAGE_NAME} && ${
    
    PACKAGE_NAME} != "")package ${
    
    PACKAGE_NAME};#end
#parse("File Header.java")
public class ${
    
    NAME} {
    
    
}

Interface修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${
    
    PACKAGE_NAME} && ${
    
    PACKAGE_NAME} != "")package ${
    
    PACKAGE_NAME};#end
#parse("File Header.java")
public interface ${
    
    NAME} {
    
    
}

Enum修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${
    
    PACKAGE_NAME} && ${
    
    PACKAGE_NAME} != "")package ${
    
    PACKAGE_NAME};#end
#parse("File Header.java")
public @interface ${
    
    NAME} {
    
    
}

AnnotationType修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${
    
    PACKAGE_NAME} && ${
    
    PACKAGE_NAME} != "")package ${
    
    PACKAGE_NAME};#end
#parse("File Header.java")
public @interface ${
    
    NAME} {
    
    
}

3、新建java代码时,填写类注释到弹出的DESCRIPTION框中

IDEA JAVA模板定义

1、Settings->File and Code Templates

Includes标签下
点击加号,添加文件,重命名为:File Header
添加内容为:

 /**
 * 
 * ${DESCRIPTION}
 *
 * @author ${USER}
 * @version 1.0
 * @date ${YEAR}-${MONTH}-${DAY} ${TIME}
 */

猜你喜欢

转载自blog.csdn.net/qq_33594101/article/details/107617771
今日推荐