Merge pull request #6937 from eugenp/BAEL-2892-v3

update restcontrolleradvice
This commit is contained in:
Loredana Crusoveanu 2019-05-11 15:54:16 +03:00 committed by GitHub
commit 734692d393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -1,13 +1,11 @@
package com.baeldung.jsonexception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@ControllerAdvice
@ResponseBody
@RestControllerAdvice
public class ErrorHandler {
@ExceptionHandler(CustomException.class)