T
- exception typepublic abstract class AbstractConcreteExceptionResolver<T extends Throwable> extends Object implements ConcreteExceptionResolver<T>
Modifier and Type | Field and Description |
---|---|
protected org.springframework.core.convert.ConversionService |
conversionService |
protected Class<T> |
exceptionClass |
protected ExceptionTranslator |
exceptionTranslator |
protected StackTraceIndicator |
stackTraceIndicator |
COMPOSITE_EXCEPTION_RESOLVER
Modifier | Constructor and Description |
---|---|
protected |
AbstractConcreteExceptionResolver()
This constructor determines the exception class from the generic class parameter
T . |
protected |
AbstractConcreteExceptionResolver(Class<T> exceptionClass) |
Modifier and Type | Method and Description |
---|---|
Class<T> |
getExceptionClass() |
ExceptionTranslator |
getExceptionTranslator() |
protected void |
logError(org.springframework.web.context.request.RequestAttributes requestAttributes,
T throwable,
ResolvedError resolvedError)
Logs the exception; on ERROR level when status is 5xx, otherwise on INFO level without stack trace, or DEBUG level
with stack trace.
|
ResolvedError |
resolve(javax.servlet.http.HttpServletRequest request,
T throwable) |
ResolvedError |
resolve(org.springframework.web.context.request.RequestAttributes requestAttributes,
T throwable) |
protected ResolvedError |
resolve(org.springframework.web.context.request.RequestAttributes requestAttributes,
T throwable,
org.joda.time.DateTime now,
Boolean stackTrace,
String path,
String track) |
void |
setConversionService(org.springframework.core.convert.ConversionService conversionService)
set conversionService.
|
void |
setExceptionTranslator(ExceptionTranslator exceptionTranslator) |
void |
setStackTraceIndicator(StackTraceIndicator stackTraceIndicator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createHeaders, find, getAttribute, localizedMessage, message, status, validationErrors
protected org.springframework.core.convert.ConversionService conversionService
protected ExceptionTranslator exceptionTranslator
protected StackTraceIndicator stackTraceIndicator
protected AbstractConcreteExceptionResolver()
T
.public final ResolvedError resolve(javax.servlet.http.HttpServletRequest request, T throwable)
resolve
in interface ExceptionResolver<T extends Throwable>
public final ResolvedError resolve(org.springframework.web.context.request.RequestAttributes requestAttributes, T throwable)
resolve
in interface ExceptionResolver<T extends Throwable>
protected ResolvedError resolve(org.springframework.web.context.request.RequestAttributes requestAttributes, T throwable, org.joda.time.DateTime now, Boolean stackTrace, String path, String track)
protected void logError(org.springframework.web.context.request.RequestAttributes requestAttributes, T throwable, ResolvedError resolvedError)
ExceptionResolver
.requestAttributes
- requestAttributesthrowable
- throwableresolvedError
- The exception to log.public Class<T> getExceptionClass()
getExceptionClass
in interface ConcreteExceptionResolver<T extends Throwable>
public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
ConcreteExceptionResolver
setConversionService
in interface ConcreteExceptionResolver<T extends Throwable>
conversionService
- convert value in validation error into stringpublic ExceptionTranslator getExceptionTranslator()
getExceptionTranslator
in interface ConcreteExceptionResolver<T extends Throwable>
public void setExceptionTranslator(ExceptionTranslator exceptionTranslator)
setExceptionTranslator
in interface ConcreteExceptionResolver<T extends Throwable>
public void setStackTraceIndicator(StackTraceIndicator stackTraceIndicator)
setStackTraceIndicator
in interface ConcreteExceptionResolver<T extends Throwable>
Copyright © 2017. All rights reserved.