IDEA常用插件和配置
date
Apr 19, 2022
slug
idea
status
Published
tags
IDEA
summary
自动导包,静态分析等
type
Post
无限试用
IDEA 2021.2.2版本是最后一个可以无限试用的版本。具体可以查看知了 大佬的文章介绍,此处挂一个下载链接
- 通常可以直接把
zip
包拖进IDE的窗口来进行插件的安装。如果无法拖动安装,你可以在Settings/Preferences...
->Plugins
里手动安装插件(Install Plugin From Disk...
)
- 插件会提示安装成功。
神秘大佬的网站 https://3.jetbra.in/ 有钱还是推荐正版,正版是买断制,可以买当年的最后一个版本
安装插件
Codota
代码提示,已经被tabnine收购,马上废弃,很久没更新了
Alibaba
阿里巴巴出的java规范检测插件
Lombok
不多介绍
Translation
翻译插件
SequenceDiagram
UML图生成
Maven helper
Maven依赖分析
Wechat mini program support
在webstorm中支持微信小程序
tabnine
代码提示
Camel Case
命名之间快速切换
Key Promoter X
快捷键提示
Presentation Assistant
快捷键展示
Gitlab project 2020
Gitlab官方插件
Save Actions
保存代码后要做的事儿
Leetcode editor
刷题必备
JPA Buddy
jpa神器
Mapstruct Support
增强对mapstruct的支持
mybatiscodehelperpro
mybatis的增强工具类
Vue
idea对vue的适配
Redis
idea对redis的适配


配置忽略文件
- .iml
- .idea

配置maven
maven配置

配置uid添加
Editor
- Inspections
Search
UID

自动导包

配置class签名
Editor
- File and Code Templates
- Class
- Interface
- Enum
- Record
- AnnotionType
/**
* Copyright [2022] [remember5]
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author wangjiahao
* @date ${DATE} ${TIME}
*/

配置
Editor
- File Encoding
Set Encoding Charset
UTF-8
Checked
Transparent native-to-ascii conversion

开源协议


MybatisPlus 生成代码
Jpa生成代码
远程调试代码
添加一个
remote jvm debug

添加
name
复制 JVM的启动参数, 在服务端启动时加入参数
host 填入 远程服务器的地址
port 填入 address后面的端口号
参数说明:
- transport: 监听 Socket 端口连接方式(也可以 dt_shmem 共享内存方式,但限于 Windows 机器,并且服务提供端和调试端只能位于同一台机)
- server: =y 表示当前是调试服务端,=n 表示当前是调试客户端
- suspend: =n 表示启动时不中断(如果启动时中断,一般用于调试启动不了的问题)
- address: =5005 表示本地监听 5005 端口
注意
- 因为这里使用到5005,所以远程服务器如果开启防火墙需要放行5005端口
- Linux 查看防火墙状态: systemctl status firewalld
- Linux 暂时关闭防火墙: systemctl stop firewalld
- agentlib:xxxx必须在 -jar 之前
IDEA 协同后 git合并
在
idea
开启协同后,多人编辑时,git
会记录不同的人change,在git commit
时会出现多个 changes by xxx

这个时候
commit
会有问题,需要提前合并下代码

选中默认的
changes
,点击ok
快捷键

try catch = win + alt + t