idea常规设置

 

 java开发目前很多都是使用IntelliJ IDEA这款神器。废话不多说,官网地址:https://www.jetbrains.com/idea/ 我一直都是保持最新版本,安装之后注册。

首先需要安装几款常用的plugins。ctrl+alt+s 打开设置页面,找到plugins,在里面搜索以下插件:
Lombok Plugin
Alibaba Java Coding Guidelines

.bash文件扩展
.log文件扩展
.sh文件扩展
.cmd文件扩展 
.md文件扩展

在Version Controller中配置git

在Edit > File Types中设置隐藏不必要的文件夹(

隐藏:在 Ignore files and folders中添加想要过滤的文件或文件夹名称

展示隐藏文件: 在过滤列表中删除掉文件或者文件夹就好了

 

在Edit > font中设置字体 18 空格1.1

 

在Appearance & Behavior > Appearance 设置界面字体大小设置,字号默认为:12

 

Editor->File Encoding设置项目默认编码

Editor->General->Code Completion让代码提示不区分大小写

修改自己习惯的Keymap快捷键

在Editor > General > Auto Import 设置 enable auto import

Editor > Build,Execution,Deployment > Compiler 设置代码自动编译:

配置文件路径:

我们设置了了那么多符合个人习惯的配置,这些配置都是默认在

一旦重装系统,所有配置消息都会丢失,又要重新设置,蛋碎一地。

i:关闭idea 

ii:打开.idea.idea.properties

iii:编辑idea.properties

idea.config.path

idea.system.path

 

iv:再次启动idea

在File > Project Structure 中配置java版本 或者 ctrl + shift + alt + s

点击SDKs=>选择JDK=>选择安装路径=>配置完java环境



在初期配置之后开发过程中可能如下几个问题,我也是从网上找到,过来记录总结下:

1:Intellij IDEA运行报Command line is too long解法

报错内容:

Error running 'ServiceStarter': Command line is too long. Shorten command line for ServiceStarter or also for Application default configuration.

解法:

修改项目下 .idea\workspace.xml,找到标签 <component name="PropertiesComponent"> , 在标签里加一行  <property name="dynamic.classpath" value="true" />

参考地址:https://blog.csdn.net/ZXJ_1223/article/details/80611089

2:IntelliJ Idea取消Could not autowire. No beans of 'xxxx' type found的错误提示

在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示。但程序的编译和运行都是没有问题的,这个错误提示并不会产生影响。但红色的错误提示在有些有强迫症的程序员眼里,多多少少有些不太舒服。

解决方案

参考网址:https://www.cnblogs.com/waterystone/p/6214212.html

3:spring boot+mybatis+idea,sql语句使用注解方式,没有XXmapper.xml文件。XXDao对象有红色报错,提示Could not autowire。

在IDEA中安装了【iBATIS/MyBatis mini-plugin】解决

4:经常引入其他项目到idea下,第一次会遇到:Cannot start compilation: the output path is not specified for module “Test”. Specify the output path in Configure Project.

其实就是没有设置编译的class文件的存储路径。

修改如下:ctrl+alt+shift+s 打开project settings

1. 在Modules设置里勾选”Inherit project compile path” 

2. 设置Project中的”Project compiler output” 

 

 5:IntelliJ IDEA默认不会立刻保存代码,而是放在一个临时区域,IntelliJ IDEA默认勾选,去掉即可;

 

 

 常用快捷键:

  1:鼠标右键或者alt+insert,显示如图

  

2:

 

 

未完待续,遇到再总结

设置

posted @ 2018-08-10 04:40  奔跑的飞猪遁世不离俗  阅读(1174)  评论(0编辑  收藏  举报