IDEA 2020 Java基础配置

一、常用插件列表(File -> Settings -> Plugins)

组件名 组件说明 配置/使用说明
Lombok 属性自动get set以及使用var -
Free Mybatis plugin 方便Mapper和Mybatis xml之前一键来回跳转
Save Actions 保存后自动格式化Java代码
Alibaba Java Coding Guidelines Alibaba代码检查规范 Tools -> 阿里编码规约
Translation 翻译/翻译+替换 选中中文鼠标右键 ->
IDE Eval Reset File -> Setting -> Manage Plugins repo... -> Add -> https://plugins.zhile.io
GsonFormatPlus Json转bean alt+s(焦点要在对象里才有用) ,鼠标右键-> Generate ->Gson...

搜索:

二、IDEA常用配置
2.1 修改默认的编码格式
File -> Settings -> 搜索encode,下图修改为UTF-8

2.2、Ctrl+鼠标滚轮切换字体大小

五、点击文件自动在项目结构选中文件
勾上Always Selected Opened File

2.3、Auto Import

2.4、自动热编译,需要引用maven包

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <version>2.4.0</version>
</dependency>

2.5、新建Java文件自动添加注释

修改Java的模板文件

/**
 * ${description}
 *
 * @author ${USER}
 * @version 1.0
 * @date ${DATE} ${TIME}
 */

2.6、IDEA右侧边栏Maven栏不见了,需要开出来

三、最后是IDEA常用的ignore

target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/

### VS Code ###
.vscode/
posted @ 2020-11-26 15:06  nickchou  阅读(1361)  评论(0编辑  收藏  举报