Diving into Spring Boot

SpringApplicationRunListener

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
org.springframework.boot.SpringApplicationRunListener=\
org.jboss.teiid.springboot.VDBDeploymentListener

Spring Core API

This section contain UML diagrams of Spring Core API.

ConfigurableApplicationContext

Spring ApplicationContext

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