Spring MVC: How to return custom 404 errorpages?

后端 未结 8 2155
遇见更好的自我
遇见更好的自我 2020-11-27 04:40

I\'m looking for a clean way to return customized 404 errorpages in Spring 4 when a requested resource was not found. Queries to different domain types should result in diff

8条回答
  •  心在旅途
    2020-11-27 04:50

    You should follow this article where you can find detailed information about exception handling in Spring MVC projects.

    spring-mvc-exception-handling

    @ControllerAdvice may help you in this case

提交回复
热议问题