Class RedirectionExceptionResolver

java.lang.Object
com.aquima.web.boot.RedirectionExceptionResolver
All Implemented Interfaces:
org.springframework.web.servlet.HandlerExceptionResolver

public class RedirectionExceptionResolver extends Object implements org.springframework.web.servlet.HandlerExceptionResolver
An exception resolver that looks for an SendRedirectUponException annotation on the failed handler and if it is present, uses the "error-redirect" query parameter in the request to use as 302 redirect. If no such query parameter is present, no redirection can be triggered and we thus proceed with default exception handling.
Since:
11.0
Author:
j.koehoorn
  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • resolveException Link icon

      @Nullable public org.springframework.web.servlet.ModelAndView resolveException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable Object handler, Exception ex)
      Specified by:
      resolveException in interface org.springframework.web.servlet.HandlerExceptionResolver