Spring Framework 5.3.x源码构建 (jdk-1.8, gradle 7.5.1, idea2024.3)

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

通过IDEA clone源码

3、下载gradle 7.5.1, 配置环境变量(自行百度)

https://mirrors.aliyun.com/gradle/distributions/v7.5.1/

4、配置IDEA

ctrl + alt + s 打开设置
配置IDEA的本地gradle环境
配置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() 之前加上


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值