Package org.bardframework.commons.web
Class ExceptionControllerAdvice
java.lang.Object
org.bardframework.commons.web.ExceptionControllerAdvice
Created by Vahid Zafari on 1/14/17.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.MessageSource -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
messageSource
@Autowired protected org.springframework.context.MessageSource messageSource
-
-
Constructor Details
-
ExceptionControllerAdvice
public ExceptionControllerAdvice()
-
-
Method Details
-
handle
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public void handle(Exception ex) -
handle
@ExceptionHandler(java.lang.UnsupportedOperationException.class) @ResponseStatus(FORBIDDEN) public void handle(UnsupportedOperationException ex) -
handle
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) @ResponseStatus(NOT_ACCEPTABLE) @ResponseBody public List<String> handle(org.springframework.web.bind.MethodArgumentNotValidException ex, Locale locale) handle exception occur in @Validated annotation in RequestMapping methods
-