Diving into Spring Boot


Listener for the SpringApplication running, it defined 5 steps of lifecycle: starting -> environmentPrepared -> contextPrepared -> contextLoaded -> finished.

Two steps are necessary to add a SpringApplicationRunListener:

  1. Create the class implemetns the org.springframework.boot.SpringApplicationRunListener and org.springframework.core.Ordered, a public constructor with two parameter SpringApplication and String[] should be added.
  2. A line like org.springframework.boot.SpringApplicationRunListener=IMPLCLASS should be added to META-INF/spring.factories.
# Listeners

Spring Core API

This section contain UML diagrams of Spring Core API.


Spring ApplicationContext

  • ApplicationContext - Central interface to provide configuration for an application.