类名注释
/**
- @ProjectName: ${PROJECT_NAME}
- @Package: ${PACKAGE_NAME}
- @ClassName: ${NAME}
- @Author: ************
- @Description: ${description}
- @Date: ${DATE} ${TIME}
- @Version: 1.0
*/
方法名注释
点击右侧+,新增一个Live Templates。
Abbreviations 是设置快捷键 。输入/*+Tab键就能出来注释了。
/**
- @Method m e t h o d method method
- @Author a u t h o r author author
- @Version 1.0
- @Description
p a r a m param param - @Return r e t u r n return return
- @Exception e x c e p t i o n exception exception
- @Date
d
a
t
e
date
date
t
i
m
e
time
time
/
点击Edit ,param里面需要填写:groovyScript(“def result=’’; def params=”KaTeX parse error: Can't use function '\"' in math mode at position 5: {_1}\̲"̲.replaceAll('[\…{_1}".replaceAll(’[\\[|\\]|\\s]’, ‘’).split(’,’).toList(); for(i = 0; i < params.size(); i++) {result+=’ @param ’ + params[i] + ((i < params.size() - 1) ? ‘\n\b’ : ‘’)}; return result", methodParameters())
。
底部原有一个黄色的警示,设置将模板应用于哪些场景,选择想要的就可以了,这里是选择Everywhere–>Java。
(如有雷同,不要杠我,你杠就是你对)