Skip to content

Commit 0b63962

Browse files
committed
feat: Controller에서 발생하는 예외도 처리 가능하게 수정(#105)
1 parent 2744856 commit 0b63962

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

be/src/main/java/yeonba/be/exception/ExceptionAdvice.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.springframework.http.HttpHeaders;
88
import org.springframework.http.HttpStatusCode;
99
import org.springframework.http.ResponseEntity;
10+
import org.springframework.stereotype.Controller;
1011
import org.springframework.web.bind.MethodArgumentNotValidException;
1112
import org.springframework.web.bind.annotation.ExceptionHandler;
1213
import org.springframework.web.bind.annotation.RestController;
@@ -16,7 +17,7 @@
1617
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
1718
import yeonba.be.util.CustomResponse;
1819

19-
@RestControllerAdvice(annotations = {RestController.class})
20+
@RestControllerAdvice(annotations = {RestController.class, Controller.class})
2021
public class ExceptionAdvice extends ResponseEntityExceptionHandler {
2122

2223
@ExceptionHandler(value = GeneralException.class)

0 commit comments

Comments
 (0)