Class ApplicationFailedEvent

All Implemented Interfaces:
Serializable

public class ApplicationFailedEvent extends SpringApplicationEvent
Event published by a SpringApplication when it fails to start.
Since:
1.0.0
Author:
Dave Syer
See Also:
  • Constructor Details

    • ApplicationFailedEvent

      public ApplicationFailedEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, Throwable exception)
      Create a new ApplicationFailedEvent instance.
      Parameters:
      application - the current application
      args - the arguments the application was running with
      context - the context that was being created (maybe null)
      exception - the exception that caused the error
  • Method Details

    • getApplicationContext

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

      public Throwable getException()
      Return the exception that caused the failure.
      Returns:
      the exception