Class ApplicationFailedEvent
- java.lang.Object
- java.util.EventObject
- org.springframework.context.ApplicationEvent
- org.springframework.boot.context.event.SpringApplicationEvent
- org.springframework.boot.context.event.ApplicationFailedEvent
- All Implemented Interfaces:
Serializable
public class ApplicationFailedEvent extends SpringApplicationEvent
Event published by aSpringApplication
when it fails to start.- See Also:
ApplicationReadyEvent
, Serialized Form
Field Summary
Fields inherited from class java.util.EventObject
source
Constructor Summary
Constructors Constructor Description ApplicationFailedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context, Throwable exception)
Create a newApplicationFailedEvent
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.context.ConfigurableApplicationContext
getApplicationContext()
Return the application context.Throwable
getException()
Return the exception that caused the failure.Methods inherited from class org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplication
Methods inherited from class java.util.EventObject
getSource, toString
Constructor Detail
ApplicationFailedEvent
public ApplicationFailedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context, Throwable exception)
Create a newApplicationFailedEvent
instance.- Parameters:
application
- the current applicationargs
- the arguments the application was running withcontext
- the context that was being created (maybe null)exception
- the exception that caused the error
Method Detail
getApplicationContext
public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
Return the application context.- Returns:
- the context
getException
public Throwable getException()
Return the exception that caused the failure.- Returns:
- the exception