public abstract class ExceptionControllerAdvice extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
protected org.springframework.context.MessageSource |
messageSource |
| Constructor and Description |
|---|
ExceptionControllerAdvice() |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(Exception ex) |
List<String> |
handle(org.springframework.web.bind.MethodArgumentNotValidException ex,
Locale locale)
handle exception occur in @Validated annotation in RequestMapping methods
|
void |
handle(UnsupportedOperationException ex) |
protected static final org.slf4j.Logger LOGGER
@Autowired protected org.springframework.context.MessageSource messageSource
@ExceptionHandler(value=java.lang.Exception.class) @ResponseStatus(value=INTERNAL_SERVER_ERROR) public void handle(Exception ex)
@ExceptionHandler(value=java.lang.UnsupportedOperationException.class) @ResponseStatus(value=FORBIDDEN) public void handle(UnsupportedOperationException ex)
@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) @ResponseStatus(value=NOT_ACCEPTABLE) @ResponseBody public List<String> handle(org.springframework.web.bind.MethodArgumentNotValidException ex, Locale locale)
Copyright © 2020. All rights reserved.