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
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionApplicationEnvironmentPreparedEvent
(ConfigurableBootstrapContext bootstrapContext, SpringApplication application, String[] args, org.springframework.core.env.ConfigurableEnvironment environment) Create a newApplicationEnvironmentPreparedEvent
instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the bootstrap context.org.springframework.core.env.ConfigurableEnvironment
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, org.springframework.core.env.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
public org.springframework.core.env.ConfigurableEnvironment getEnvironment()Return the environment.- Returns:
- the environment
-