以下操作在Macos环境下进行
前言
最近打算开始学习SpringFramework源码以提升自己,边学习边记录自己走过的坑,有错误之处请评论区指正,感谢!!!
使用工具
- JDK1.8
- Spring-Framework5.2.x 源码
- Gradle 5.6.4
- Idea2021
Gradle安装配置(编译工具)
方式一、压缩包(推荐)
建议下载源码中标识的gradle版本(源码gradle/wrapper/gradle-wrapper.properties中)
1.下载压缩包,解压至~/software/文件夹下
2.设置环境变量
echo $SHELL 先查看当前shell
/bin/bash 则修改 ~/.bash_profile 文件
/bin/zsh 则修改 ~/.zshrc 文件
添加以下配置:
export GRADLE_HOME=/Users/mac/software/gradle
export PATH=$PATH:$GRADLE_HOME/bin
source ~/.zshrc 或 source ~/.bash_profile 刷新
3.验证安装
gradle -v
- 添加Gradle配置
allprojects{
repositories {
def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'
all {
ArtifactRepository repo