文章目录
环境准备
- 安装jdk,idea,maven并做好相应配置
- 操作系统:windows
Spring源码下载
Spring源码Github仓库地址为:https://github.com/spring-projects/spring-framework
首先,选择合适的RELEASE版本,然后下载ZIP包即可
软件版本介绍:
- GA:General Availability,官方正式发布的稳定版本,同质的还有RELEASE,Stable,Final
- RC:Release Candidate,发行候选版本,基本不再加入新的功能
- Alpha:内部测试版本,bug较多,功能不全
- Beta:公开测试版,比Alpha版本晚些,还会加功能,修bug
- M:Milestone,开发期发行版本,边开发边发行
导入IDEA
Within your locally cloned spring-framework working directory:
- Precompile
spring-oxm
with./gradlew :spring-oxm:compileTestJava
- Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
- When prompted exclude the
spring-aspects
module (or after the import via File-> Project Structure -> Modules)- Code away
- 在解压缩后的源码路径下执行预编译指令:
./gradlew :spring-oxm:compileTestJava
- build.gradle 文件里配置阿里云镜像加速
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
}
dependencies {
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
classpath 'io.spring.asciidoctor:spring-asciidoctor-extensions:0.1.3.RELEASE'
}
}