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
public class ApplicationEnvironmentPreparedEvent extends SpringApplicationEvent
Event published when aSpringApplication
is starting up and theEnvironment
is first available for inspection and modification.- See Also:
- Serialized Form
Field Summary
Fields inherited from class java.util.EventObject
source
Constructor Summary
Constructors Constructor Description ApplicationEnvironmentPreparedEvent(SpringApplication application, String[] args, org.springframework.core.env.ConfigurableEnvironment environment)
Create a newApplicationEnvironmentPreparedEvent
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.core.env.ConfigurableEnvironment
getEnvironment()
Return the environment.Methods inherited from class org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplication
Methods inherited from class java.util.EventObject
getSource, toString
Constructor Detail
ApplicationEnvironmentPreparedEvent
public ApplicationEnvironmentPreparedEvent(SpringApplication application, String[] args, org.springframework.core.env.ConfigurableEnvironment environment)
Create a newApplicationEnvironmentPreparedEvent
instance.- Parameters:
application
- the current applicationargs
- the arguments the application is running withenvironment
- the environment that was just created
Method Detail
getEnvironment
public org.springframework.core.env.ConfigurableEnvironment getEnvironment()
Return the environment.- Returns:
- the environment