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:
- Create the class implemetns the
org.springframework.boot.SpringApplicationRunListener
andorg.springframework.core.Ordered
, a public constructor with two parameterSpringApplication
andString[]
should be added. - A line like
org.springframework.boot.SpringApplicationRunListener=IMPLCLASS
should be added toMETA-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
- ApplicationContext - Central interface to provide configuration for an application.