update restcontrolleradvice

This commit is contained in:
Loredana 2019-05-11 11:42:08 +03:00
parent 3c72fd0487
commit 1f077401bd
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)