[스프링부트] @ExceptionHandler를 통한 예외처리
@ExceptionHandler는 Controller계층에서 발생하는 에러를 잡아서 메서드로 처리해주는 기능이다.Service, Repository에서 발생하는 에러는 제외한다.간단한 예시부터 살펴보자.이렇게 @Controller로 선언된 클
velog.io
[Spring] Spring의 예외처리 방법
ExceptionHandlerExceptionResolver, 그리고 이를 위해 @RestControllerAdvice를 사용하는 이유를 공부해 보았다.
velog.io
'Spring > @annotation' 카테고리의 다른 글
@Documented (0) | 2024.06.09 |
---|---|
@Service (0) | 2024.06.09 |
@RestControllerAdvice (0) | 2024.06.08 |
@Slf4j (0) | 2024.06.08 |
@Override (0) | 2024.06.08 |