org.springframework.boot.context.event

Class ApplicationPreparedEvent

  • All Implemented Interfaces:
    java.io.Serializable


    public class ApplicationPreparedEvent
    extends SpringApplicationEvent
    Event published as when a SpringApplication is starting up and the ApplicationContext is fully prepared but not refreshed. The bean definitions will be loaded and the Environment is ready for use at this stage.
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      org.springframework.context.ConfigurableApplicationContext getApplicationContext()
      Return the application context.
      • Methods inherited from class org.springframework.context.ApplicationEvent

        getTimestamp
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ApplicationPreparedEvent

        public ApplicationPreparedEvent(SpringApplication application,
                                        java.lang.String[] args,
                                        org.springframework.context.ConfigurableApplicationContext context)
        Create a new ApplicationPreparedEvent instance.
        Parameters:
        application - the current application
        args - the arguments the application is running with
        context - the ApplicationContext about to be refreshed
    • Method Detail

      • getApplicationContext

        public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
        Return the application context.
        Returns:
        the context