使用 IDEA 时,我们需要自动生成类的注释。
- Windows
Files -> Settings -> Editor -> File and Code Templates
- Mac
Preferences -> Editor -> File and Code Templates
选中 Files 下的 Class,如图所示:

然后在类名上方写入注释的内容:
1 | /** |
同时在 Interface, Enum 里面也添加上述内容。
下次当你创建类 Class, Interface, Enum 时,就会提示让你输入 description,然后会自动生成注释。
