Class ContextRefreshedWithApplicationEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.boot.context.event.SpringApplicationEvent
org.springframework.cloud.context.config.ContextRefreshedWithApplicationEvent
- All Implemented Interfaces:
Serializable
public class ContextRefreshedWithApplicationEvent
extends org.springframework.boot.context.event.SpringApplicationEvent
A custom event for spring cloud context use cases that need the saved Spring
Application. This prevents a duplicated ApplicationPreparedEvent from being
republished.
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionContextRefreshedWithApplicationEvent(org.springframework.boot.SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context) Create a newContextRefreshedWithApplicationEventinstance. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.context.ConfigurableApplicationContextReturn the application context.Methods inherited from class org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplicationMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class EventObject
getSource, toString
-
Constructor Details
-
ContextRefreshedWithApplicationEvent
public ContextRefreshedWithApplicationEvent(org.springframework.boot.SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context) Create a newContextRefreshedWithApplicationEventinstance.- Parameters:
application- the current applicationargs- the arguments the application is running withcontext- the ApplicationContext about to be refreshed
-
-
Method Details
-
getApplicationContext
public org.springframework.context.ConfigurableApplicationContext getApplicationContext()Return the application context.- Returns:
- the context
-