IntelliJ IDEA导入Spring源码

下载Spring-framework源码
Spring-framework 源码在GitHub中得仓库位置:
https://github.com/spring-projects/spring-framework.git

安装GIt:
下载路径: https://www.git-scm.com/download/win
具体安装方式:https://jingyan.baidu.com/article/9f7e7ec0b17cac6f2815548d.html

因为Spring的包依赖管理工具是: Gradle,所以这里需要安装Gradle支持:
下载路径: http://services.gradle.org/distributions/
具体安装方式:https://jingyan.baidu.com/article/00a07f38706f0b82d028dcf3.html

在任意位置建一个新的文件夹下,然后进入目录下执行
git clone git://github.com/SpringSource/Spring-framework.git
这里写图片描述

这里写图片描述

import-into-eclipse.md 内容,介绍了编译后如何导入Eclipse中
这里写图片描述

import-into-idea.md 内容,介绍了编译后如何导入IntelliJ IDEA中
这里写图片描述

执行命令后,会输出一大堆得下载日志,下载的内容很多,会持续很久:
这里写图片描述

下载中也有可能会出现一些错误:
这里写图片描述

这个时候需要进入相应的模块下找到spring*.gradle文件,将相应的内容注释掉。
如果还碰到一些依赖下载失败的也可以直接尝试导入到IDEA中,交给IDEA进行下载:
这里写图片描述

因为我这里使用的是IDEA,直接Open
这里写图片描述

扫描二维码关注公众号,回复: 3117593 查看本文章

直接导入皆可, 伴随的还有可能会有文件的下载,待下载完成后。
这里写图片描述
就是上图结果,每一个模块文件夹右下角呈现蓝色正方形,说明导入成功。

我们还可以利用IDEA的强大工具来查看接口和类之间的关系,具体操作方式在下方链接:
https://blog.csdn.net/qq_27093465/article/details/52857307

猜你喜欢

转载自blog.csdn.net/qq_30243515/article/details/82051894