# spring源码学习 **Repository Path**: zyxi/spring-source-learning ## Basic Information - **Project Name**: spring源码学习 - **Description**: Spring 5.3.6-SNAPSHOT 源码学习,关键代码进行中文注释 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-21 - **Last Updated**: 2021-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Spring 官方仓库介绍 # Spring Framework [![Build Status](https://ci.spring.io/api/v1/teams/spring-framework/pipelines/spring-framework-5.3.x/jobs/build/badge)](https://ci.spring.io/teams/spring-framework/pipelines/spring-framework-5.3.x?groups=Build") [![Revved up by Gradle Enterprise](https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.spring.io/scans?search.rootProjectNames=spring) This is the home of the Spring Framework: the foundation for all [Spring projects](https://spring.io/projects). Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring". Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the [Overview](https://docs.spring.io/spring/docs/current/spring-framework-reference/overview.html#spring-introduction) section as reference for a more complete introduction. ## Code of Conduct This project is governed by the [Spring Code of Conduct](CODE_OF_CONDUCT.adoc). By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io. ## Access to Binaries For access to artifacts or a distribution zip, see the [Spring Framework Artifacts](https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Artifacts) wiki page. ## Documentation The Spring Framework maintains reference documentation ([published](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/) and [source](src/docs/asciidoc)), Github [wiki pages](https://github.com/spring-projects/spring-framework/wiki), and an [API reference](https://docs.spring.io/spring-framework/docs/current/javadoc-api/). There are also [guides and tutorials](https://spring.io/guides) across Spring projects. ## Micro-Benchmarks See the [Micro-Benchmarks](https://github.com/spring-projects/spring-framework/wiki/Micro-Benchmarks) Wiki page. ## Build from Source See the [Build from Source](https://github.com/spring-projects/spring-framework/wiki/Build-from-Source) Wiki page and the [CONTRIBUTING.md](CONTRIBUTING.md) file. ## Continuous Integration Builds Information regarding CI builds can be found in the [Spring Framework Concourse pipeline](ci/README.adoc) documentation. ## Stay in Touch Follow [@SpringCentral](https://twitter.com/springcentral), [@SpringFramework](https://twitter.com/springframework), and its [team members](https://twitter.com/springframework/lists/team/members) on Twitter. In-depth articles can be found at [The Spring Blog](https://spring.io/blog/), and releases are announced via our [news feed](https://spring.io/blog/category/news). ## License The Spring Framework is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0). # 如何下载代码后编译 Spring 5.x 的版本需要使用Gradle工具进行 依赖下载,项目编译 使用官方镜像会特别慢 我使用是阿里云的镜像 配置文件 setting.gradle ``` pluginManagement { repositories { gradlePluginPortal() maven { url 'https://maven.aliyun.com/repository/public/' } maven { url 'https://maven.aliyun.com/repository/spring/' } maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://repo.spring.io/plugins-release' } } } ``` 在IDEA中慢慢等待它自动下载依赖,编译完成 # 如何调试源码 我们有时候需要进行断点调试,在Spring 各个模块中创建一个自己的模块 - 在spring-framework项目上右击 new -> Module... - 通过gradle的方式去创建 - 创建成功得到一个build.gradle的文件 ``` plugins { id 'java' } group 'org.springframework' version '5.3.6-SNAPSHOT' repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' compile(project(":spring-context")) //添加依赖的模块,我这里只需要调试IOC所以只引入spring-context就可以了 } ```