1、下载jdk安装并配置环境变量(推荐下面版本,解决import jdk.jfr.Category; 编译失败问题)
https://raw.gitcode.com/open-source-toolkit/48c91/blobs/977748b34a7d621d1d2268227de54aa3cc44ba7f/OpenJDK8U-jdk_x64_windows_hotspot_8u302b08.zip
2、下载spring-framework源码,切换分支到5.3.x
https://github.com/spring-projects/spring-framework.git
备用地址
https://gitcode.com/gh_mirrors/sp/spring-framework
3、下载gradle 7.5.1, 配置环境变量(自行百度)
https://mirrors.aliyun.com/gradle/distributions/v7.5.1/
4、配置IDEA
ctrl + alt + s 打开设置
配置IDEA的本地gradle环境
配置项目字节码版本
ctrl + alt + shift + s 打开项目结构
5、配置 gradle/wrapper/gradle-wrapper.properties 文件参数
5.1配置gradle下载地址为本地(路径为gradle二进制文件压缩包路径)
distributionUrl=file:///D:/gradle/gradle-7.5.1-bin.zip
配置仓库镜像
根目录下文件\buildSrc\build.gradle
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/central' }
mavenCentral()
gradlePluginPortal()
}
根目录下文件\build.gradle
mavenCentral() 之前加上