Class ApplicationStartedEvent

All Implemented Interfaces:
Serializable

public class ApplicationStartedEvent extends SpringApplicationEvent
Event published once the application context has been refreshed but before any application and command line runners have been called.
Since:
2.0.0
Author:
Andy Wilkinson
See Also:
  • Constructor Details

  • Method Details

    • getApplicationContext

      public ConfigurableApplicationContext getApplicationContext()
      Return the application context.
      Returns:
      the context
    • getTimeTaken

      public @Nullable Duration getTimeTaken()
      Return the time taken to start the application, or null if unknown.
      Returns:
      the startup time
      Since:
      2.6.0