Spring源码阅读——IDEA环境搭建(最新,快捷)

以下是本人实践过,但难免会遇到问题,办法总比问题多

文末有编译好的源码

一、环境:


JAVA( jdk1.8至少)

Gradle: 6.0.1  https://gradle.org/next-steps/?version=6.0.1&format=bin

Idea: IntelliJ IDEA 2019.3.3 (Ultimate Edition)

自行配置JAVA环境和Gradle环境

二、Spring项目地址:

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

版本:spring-framework-5.2.0.RELEASE

可采用Git 、 SVN 、直接下载等多种方式,这里从https://gitee.com/ 创建仓库时直接导入GitHub项目 ,再从gitee下载

三、配置

解压后可看到:

 

配置maven 地址,注释掉io.spring.gradle-enterprise-conventions 编译通不过

pluginManagement {
  
repositories {
     
gradlePluginPortal()
      maven { url
'https://maven.aliyun.com/repository/spring-plugin' }
   }
}


plugins {
  
id
"com.gradle.enterprise" version "3.2"
  
// id "io.spring.gradle-enterprise-conventions" version "0.0.2"
}

 

修改配置为:

maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
可避免问题:Counld not find XXX.jar

打开Idea 配置Gradle、jdk

 

四、导入项目编译

Idea直接导入,选Gradle , Idea会提示你进行gradle

编译有点慢 ,结果:

编译好的源码:https://download.csdn.net/download/sinat_34324872/12626363

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值