Class ApplicationEnvironmentPreparedEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.boot.context.event.SpringApplicationEvent
org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent
- All Implemented Interfaces:
Serializable
Event published when a
SpringApplication
is starting up and the
Environment
is first available for inspection and modification.- Since:
- 1.0.0
- Author:
- Dave Syer
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionApplicationEnvironmentPreparedEvent
(ConfigurableBootstrapContext bootstrapContext, SpringApplication application, String[] args, ConfigurableEnvironment environment) Create a newApplicationEnvironmentPreparedEvent
instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the bootstrap context.Return the environment.Methods inherited from class org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplication
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
ApplicationEnvironmentPreparedEvent
public ApplicationEnvironmentPreparedEvent(ConfigurableBootstrapContext bootstrapContext, SpringApplication application, String[] args, ConfigurableEnvironment environment) Create a newApplicationEnvironmentPreparedEvent
instance.- Parameters:
bootstrapContext
- the bootstrap contextapplication
- the current applicationargs
- the arguments the application is running withenvironment
- the environment that was just created
-
-
Method Details
-
getBootstrapContext
Return the bootstrap context.- Returns:
- the bootstrap context
- Since:
- 2.4.0
-
getEnvironment
Return the environment.- Returns:
- the environment
-