eclipse用的时间不短了。有次在群里讨论问题时,截代码图,结果被浓浓的鄙视一番(尽管我已经在eclipse上做了各种伪装,换字体换背景)
![看这聊天 这是到了不得不换工具的节奏啊](https://upload-images.jianshu.io/upload_images/21408679-319ae6667df9c8a3.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
好吧,既然这样。那就转IDEA来用一下吧。
省去了下载安装步骤,可以下载学习交流版的那种,找不到的可以找我分享。
转化前 使用eclipse,maven,springboot。
#####步骤如下
1.启动idea,进行maven配置
![启动界面](https://upload-images.jianshu.io/upload_images/21408679-4966def154a7e444.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
由于一开始都是使用默认的配置。在下图中需要配置maven的安装目录,配置文件,已经本地仓库
![配置MAVEN](https://upload-images.jianshu.io/upload_images/21408679-187016d261661b0f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![image.png](https://upload-images.jianshu.io/upload_images/21408679-95c4376903d22b00.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2.导入已经存在工程
为了便于查看区别,我们把工程下面的eclipse相关文件全部去掉,仅剩下src与pom文件。然后导入项目
![点击Import Project](https://upload-images.jianshu.io/upload_images/21408679-f2828625c737fa35.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![选择工程所在目录](https://upload-images.jianshu.io/upload_images/21408679-4f044df005ae18b0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![导入时选择Maven](https://upload-images.jianshu.io/upload_images/21408679-7feb850dddb4d18f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![需要选择jdk,否则后续可能无法编译项目](https://upload-images.jianshu.io/upload_images/21408679-359848e7a0c36f9e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
到这里就一路Next吧。
3.导入项目之后发现并不能点击Run
原来还需要修改workspace.xml
![workspace文件](https://upload-images.jianshu.io/upload_images/21408679-1a750ead7508cfee.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
加入如下配置
```
<component>
<option>
<option>
<option>
<list>
<rulestate>
<option>
<rulestate>
<option>
<option>
```
修改文件之后重启一下idea。
4. 跑起来啦
![可以跑起来啦](https://upload-images.jianshu.io/upload_images/21408679-e60005647af8ad96.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
简单步骤就是这样,先跑起来再说。
END-
閱讀更多 戴夫的日常扯皮 的文章