Mac Intellij IDEA搭建spring-framework源码环境

环境配置:

说明:spring源码从svn迁移到Github,基于Gradle来构建项目
Git地址:https://github.com/spring-projects/spring-framework

1、下载代码到本机

git clone https://github.com/spring-projects/spring-framework.git

2、下载源码后有个文件import-into-idea.md,里面有相应的步骤
Step1、

进入spring-framework工程
执行./gradlew :spring-oxm:compileTestJava 如下图:
执行命令
成功图片

Step2、

./gradlew
这里写图片描述

Step3、项目导入idea 时间比较长

Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle

Step4、删除spring-aspects模块 原因:spring-aspects does not compile due to references to aspect types unknown to IntelliJ IDEA. See http://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the ‘spring-aspects’ can be excluded from the project to avoid compilation errors.

File->Project Structure->Modules delete spring-aspects

Step5、

Rebuild Project 编译成功

猜你喜欢

转载自blog.csdn.net/liuxiaoming1109/article/details/79638554