66.Spring source code analysis-code download
one。 Brief introduction
Spring's name must have done Java background students will not be strange, what spring mvc, spring boot,spring family bucket and so on, so I want to systematically learn the source code of spring.
And to learn the source code, you have to download the source code of spring. At present, the source code of spring is open on github. At the address below, you can use git clone.
Https://github.com/spring-projects/
two。 Brief introduction of spring structure
Spring has three basic frameworks, and the other services are based on these three basic frameworks, spring-core, spring-context, and spring-beans, which are unified in spring-framework.
three。 Compile
There is an introduction in each project, and then you can open the code with IntelliJ IDEA, as follows:
four。 Research entrance
Because I use springboot a lot in my project, I decided to start with springboot. The source code of springboot is linked to the source code page of spring project above.
Before I look at the code, I usually ask myself a few questions
How did springboot start? How does springboot start tomcat? Because we only need to write a few mappings, we can complete several restful interfaces. How is it called into springboot when the interface is accessed, that is, how does tomcat relate to springboot?
With these questions, and then look at the source code, I hope there will be some harvest.