This repo contains learning notes about the analysis of the source code of the Spring Framework (v5.2.x) and Spring Boot (v2.4.x). I am trying to make the notes as easy to be understood as possible as I can, Therefore, I mainly organize the notes into diagrams combining with just some tiny code snippets in case for a clearer explanation.
Roger Lin, 04/15/2021, Los Angeles
Spring IoC Container (click for reading)
In this section, we will discuss:
-
What happens behind when you exectue the following code?
public class SpringDemo { public static void main(String[] args) { ApplicationContext applicationContext = new XmlWebApplicationContext( new ClasspathResource("applicationContext.xml") ) } }
or
@Configuration public class SpringDemo { public static void main(String[] args) { ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringDemo.class) } }
-
What's the relationship between
ApplicationContext
andBeanFactory
? -
How bean definitions in XML-based configuration file are being loaded?
-
How bean definitions in JavaConfig classes are being loaded?
-
The extension points of the Spring IoC Container
-
BeanFactoryPostProcessor
-
BeanPostProcessor
-
-
etc.
TODO: waiting for new content
Spring Boot AutoConfiguration (click for reading)
In this section, we will discuss:
-
How does Spring Boot implement its auto-configuration feature?
-
How to encapsulate a Spring Boot starter for custom needs?
This repo is frequently and continuously updating. If you are interested in it, I appreciate your click of the like and the watch button. Thanks.
The diagrams in this repo are created by OmniGraffle.