修改类模板

创建类时增加lombok插件的日志注解@Slf4j,方便日志处理
image.png

  1. #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
  2. import lombok.extern.slf4j.Slf4j;
  3. #parse("File Header.java")
  4. @Slf4j
  5. public class ${NAME} {
  6. }

文件头-增加类注释

image.png

  1. /**
  2. *
  3. *
  4. * @author : ${USER}
  5. * @version 1.0.0
  6. * @date : ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
  7. */

关于变量引用说明:

  1. This is a built-in template. It contains a code fragment that can be included into file templates (Templates tab) with the help of the #parse directive. The template is editable. Along with static text, code and comments, you can also use predefined variables that will then be expanded like macros into the corresponding values.
  2. Predefined variables will take the following values:
  3. ${PACKAGE_NAME}
  4. name of the package in which the new file is created
  5. ${USER}
  6. current user system login name
  7. ${DATE}
  8. current system date
  9. ${TIME}
  10. current system time
  11. ${YEAR}
  12. current year
  13. ${MONTH}
  14. current month
  15. ${MONTH_NAME_SHORT}
  16. first 3 letters of the current month name. Example: Jan, Feb, etc.
  17. ${MONTH_NAME_FULL}
  18. full name of the current month. Example: January, February, etc.
  19. ${DAY}
  20. current day of the month
  21. ${DAY_NAME_SHORT}
  22. first 3 letters of the current day name. Example: Mon, Tue, etc.
  23. ${DAY_NAME_FULL}
  24. full name of the current day. Example: Monday, Tuesday, etc.
  25. ${HOUR}
  26. current hour
  27. ${MINUTE}
  28. current minute
  29. ${PROJECT_NAME}
  30. the name of the current project
  31. Apache Velocity 模板语言已使用