rogerlin0330 / spring-learning

My notes for learning Spring and Spring Boot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spring-learning

GitHub license Maintenance

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 Framwork

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 and BeanFactory?

  • 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.

Spring AOP

TODO: waiting for new content

Spring Boot

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.

About

My notes for learning Spring and Spring Boot.

License:MIT License