org.springframework.boot.context.event

Class ApplicationEnvironmentPreparedEvent

  • All Implemented Interfaces:
    java.io.Serializable


    public class ApplicationEnvironmentPreparedEvent
    extends SpringApplicationEvent
    Event published when a SpringApplication is starting up and the Environment is first available for inspection and modification.
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • ApplicationEnvironmentPreparedEvent

        public ApplicationEnvironmentPreparedEvent(ConfigurableBootstrapContext bootstrapContext,
                                                   SpringApplication application,
                                                   java.lang.String[] args,
                                                   org.springframework.core.env.ConfigurableEnvironment environment)
        Parameters:
        bootstrapContext - the bootstrap context
        application - the current application
        args - the arguments the application is running with
        environment - the environment that was just created
    • Method Detail

      • getBootstrapContext

        public ConfigurableBootstrapContext 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