IntelliJ IDEA导入Spring源码

环境准备

IntelliJ IDEA、JDK 1.8、Gradle

源码下载

我的码云私人仓库   https://gitee.com/xieweikun/Spring-Framework-5.1.9.RELEASE

修改build.gradle

修改一下 Gradle 国内阿里云仓库的镜像地址以便于加速下载依赖。

打开「build.gradle」文件,分别在第三行和第 151 行配置如下的镜像地址:

repositories {
    maven { url "https://maven.aliyun.com/repository/spring-plugin" }
    maven { url "https://maven.aliyun.com/nexus/content/repositories/spring-plugin" }
    maven { url "https://repo.spring.io/plugins-release" }
}

repositories {
    maven { url "https://maven.aliyun.com/repository/central" }
    maven { url "https://repo.spring.io/libs-release" }
    mavenLocal()
}

常见错误

exception during working with external system: java.lang.AssertionError错误

修改./gradle/wrapper/gradle-wrapper.properties文件

distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip

在IDEA中导入源码

idea -> File -> Open…

IntelliJ IDEA导入Spring源码_第1张图片

 

 

 

你可能感兴趣的:(后端技术)