spring 을 사용할 때 에러가 난다면 아래와 같은 모양으로 호출이 된다. 1. WAS(여기까지 전파) 컨트롤러(/error- page/500) -> View 여기서 필터의 경우 2번이나 호출된다. 자원적으로는 낭비이며 굳이 요청할 필요가 없다. 혹은 에러페이지일 때만 요청하는 필터를 필요로 할 수도 있을 것이다. 먼저 로그 필터를 만들어 주었다. package hello.exception.filter; import jakarta.servlet.*; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; import java.io.IOException; import java.util.UUID; @Slf4j pub..
먼저 예제로 에러컨트롤러를 만든다. package hello.exception.servlet; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import java.io.IOException; @Slf4j @Controller public class ServletExController { @GetMapping("/error-ex") public void errorEx(){ throw new RuntimeExcep..
- Total
- Today
- Yesterday
- 항해99
- reject
- 인터셉터
- HTTP
- ArgumentResolver
- React
- 백엔드 개발자 공부
- 예외처리
- JPA
- 컨트
- 항해플러스
- 스프링공부
- 로그인
- exception
- rejectValue
- BindingResult
- Intercepter
- Java
- 향해플러스백엔드
- 스프링부트
- hypertexttransferprotocol
- react실행
- SpringBoot
- 향해플러스
- 백엔드 개발자 역량
- 리터럴
- 향해99
- filter
- jpa api
- thymleaf
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |