반응형 뷰 선택 우선순위2 Spring 서버에서 예외발생시의 흐름과 뷰 선택 우선순위 Spring 서버에서 예외발생시의 흐름과 뷰 선택 우선순위 ## 서버에서 예외발생시에 흐름 1. WAS(여기까지 전파) 컨트롤러(/error- page/500) -> View - 과거에는 뷰의 위치를 xml로 작성하였으나, 스프링 부트 사용후에는 디폴트위치가 템플릿 아래 error폴더이다. ---- ## 뷰 선택 우선순위는 다음과 같다. [BasicErrorController] 1.뷰템플릿 - resources/templates/error/500.html - resources/templates/error/5xx.html 2.정적리소스(static,public) - resources/static/error/400.html - resources/static/error/404.html - resources/s.. 2023. 12. 11. spring 뷰 선택 우선 순위 스프링에는 뷰선택의 우선순위가 존재한다. 뷰 선택 우선순위 BasicErrorController 의 처리 순서 1.뷰템플릿 resources/templates/error/500.html resources/templates/error/5xx.html 2.정적리소스(static,public) resources/static/error/400.html resources/static/error/404.html resources/static/error/4xx.html 3.적용 대상이 없을 때 뷰 이름(error) resources/templates/error.html 2023. 11. 10. 이전 1 다음 반응형