update restcontrolleradvice
This commit is contained in:
parent
3c72fd0487
commit
1f077401bd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue