一、调整字体大小
1、非代码窗口字体

2、代码窗口字体

二、代码提示设置大小写无关

三、设置自定义Java类注释内容

四、设置properties配置文件字符码编码
File->Settings

五、设置序列化自动生成序列ID
注意:设置完成需要重启IDEA才能生效


重启IDEA,鼠标放在类名处,按键盘Alt+Enter,就会出现SerialVersionUID

六、设置Eclipse快捷键习惯

七、显示方法之间的分割线
File->Settings

八、去除spring项目@Autowired红线
Could not autowire. No beans of 'XXX' type found.

解决方法:

九、常用插件安装
1、lombok
日志打印工具,不用在每个类都写Logger log = LoggerFactory.getLogger()
类上加@Slf4j注解直接使用log.info()
需要配合依赖包使用
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.18</version>
<scope>provided</scope>
</dependency>

2、albaba Java代码规范插件,参照alibabJava开发手册
File->Settings->Plugins

3、Maven Helper
主要功能如下:查找和排除冲突依赖项的简便方法,为包含当前文件或根模块的模块运行/调试maven目标的操作,运行/调试当前测试文件的操作

4、Free-idea-mybatis
mybatis xml和对应的mapper之间来回切换的时候,有时候不同人开发,放置的位置又不同,使用此插件后,来回切换的时候异常方便,和所放置的位置无关

显示效果,点击左边绿色的箭头可以转到对应的xml, xml也有相应的箭头转到Java代码

5、TranslationPlugin
翻译插件,谷歌翻译

直接选中你想要翻译的词,选中英文翻译成中文,选中中文翻译成英文,
然后右键选择,或者快捷键 Ctrl+Alt+1

6、FindBugs
深入检查代码异常

右键点击文件,包或者工程,会出现如下界面

网友评论