- application.yml의 server.error.path=/error에 mapping 되는 Controller
org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController

- custom exception controller사용시 exception 가져오기
Object exception = request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
log.error("", exception);



https://www.baeldung.com/spring-boot-custom-error-page

Spring Boot: Customize Whitelabel Error Page | Baeldung

Learn how to customize the default error page in a Spring Boot application.

www.baeldung.com




https://eblo.tistory.com/50

Spring Boot에서 에러 페이지 처리하기

Spring Boot에서 에러 페이지 처리하기 아래 두가지만 하면 끝~~~ 1. ErrorController를 implements 해서 에러 컨트롤러를 만든다. 2. error 페이지를 만든다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2..

eblo.tistory.com



https://supawer0728.github.io/2019/04/04/spring-error-handling/

(Spring Boot)오류 처리에 대해

서론오류 처리는 어플리케이션 개발에 있어 매우 큰 부분을 차지한다.오류를 예측하는 것과 예방하는 것, 그리고 오류를 빨리 발견하고 고칠 수 있는 것은 훌륭한 개발자의 필수조건이라고 생각한다.본 문서에서는 Spring에서 어떻게 예외처리 잘 할 수 있도록 도와주는지를 알아보고 공유하려한다.

supawer0728.github.io



https://medium.com/@hyunalee419/spring-boot-custom-error-page-4258cd37f05c

[Spring Boot] custom error page

웹사이트를 운영하다보면 404, 500 등의 에러페이지를 서버에서 기본으로 제공해주는 화면이 아닌 각 사이트의 디자인에 맞춰 변경해야 한다.

medium.com




'spring-boot' 카테고리의 다른 글

content is not allowed in prolog 에러  (0) 2020.04.10
spring boot2 multiple datasource  (0) 2020.04.02
spring-boot-starter-actuator (모니터링)  (0) 2020.01.29
spring boot에서 filter 사용하기  (0) 2020.01.14
spring boot auto reload  (0) 2020.01.03
Posted by 張's blog
,