Intellij IDEA常用操作整理手册

时间:2022-07-24
本文章向大家介绍Intellij IDEA常用操作整理手册,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

git使用

IDEA为git项目开启git支持: VCS->Enable Version Control Integration…

Git rebase相当于Svn update

设置注释模板

file->setting->Editor->File and Code Templates->Includes->File Header

https://blog.csdn.net/xiaoliulang0324/article/details/79030752

快捷键模式

设置快捷键模式为Eclipse模式 file->setting->Keymap

快捷键

IDEA生成set、get方法,alt+Insert,然后选择

热部署

点击setting,Build,Execut, Deployment -> Compiler,勾选中左侧的Build Project automatically

tab设置为4个空格

setting,搜索Code Style->选择java,Scheme选为Project,然后将Tab size改为4就好

打开实现类

Ctrl+Alt+B打开实现类方法,比如打开ServiceImpl具体方法,这个快捷键也可以打开接口的实现类

http://www.cnblogs.com/sxdcgaq8080/p/7839114.html http://blog.csdn.net/u013659732/article/details/50673753

方法调用栈

Ctrl+Alt+H

快速打开文件

Ctrl+shift+N

IDEA清缓存

File->invalidate Cache

查看版本记录

右键->Annotate

IDEA破解教程

https://www.cnblogs.com/dfsu/p/11362594.html

查看Project当前分支

右键->git->repository->Branches(查看)

查看maven jar依赖图

右键->maven->show dependencies显示jar依赖图

取消启动默认项目

settings-> Appearance & Behavior -> System Settings->去掉勾选reopen last project on startup

打包jar

File->Project structure

点加号,Jar->From Modules from dependencies…

Build->Build Artifacts

“java.lang.SecurityException: Invalid signature file digest for Manifest main attrib…”异常:找到META-INF目录,将*.SF,.DSA,.RSA文件移除

META-INF版本号:找到META-INF 目录,然后编辑MANIFEST.MF

Unable to open debugger port (127.0.0.1:63491): java.net.SocketException “socket closed”

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.22.1</version>
  <!--版本根据你自己的版本写 -->
    <configuration>
        <skipTests>true</skipTests>
    </configuration>
</plugin>
<properties>
	<skipTests>true</skipTests>
</properties>
<build>
        <finalName>fileName</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

运行命令:

mvn clean package -Dmaven.test.skip=true