Class FilterExceptionResolverFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
com.broadleafcommerce.cartoperation.web.filter.FilterExceptionResolverFilter
All Implemented Interfaces:
jakarta.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

public class FilterExceptionResolverFilter extends org.springframework.web.filter.OncePerRequestFilter
Resolves exceptions to error views for when exceptions are thrown from a filter (e.g. CartResolutionFilter).
Author:
Jacob Mitash
  • Field Summary

    Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

    ALREADY_FILTERED_SUFFIX

    Fields inherited from class org.springframework.web.filter.GenericFilterBean

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    FilterExceptionResolverFilter(org.springframework.web.servlet.DispatcherServlet dispatcherServlet, List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object
    determineHandler(@NonNull jakarta.servlet.http.HttpServletRequest request, RuntimeException ex)
     
    protected void
    doFilterInternal(@NonNull jakarta.servlet.http.HttpServletRequest request, @NonNull jakarta.servlet.http.HttpServletResponse response, @NonNull jakarta.servlet.FilterChain filterChain)
     
    protected org.springframework.web.servlet.DispatcherServlet
     
    protected List<org.springframework.web.servlet.HandlerExceptionResolver>
     
    protected void
    handleException(@NonNull jakarta.servlet.http.HttpServletRequest request, @NonNull jakarta.servlet.http.HttpServletResponse response, RuntimeException ex)
     

    Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

    doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch

    Methods inherited from class org.springframework.web.filter.GenericFilterBean

    addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FilterExceptionResolverFilter

      public FilterExceptionResolverFilter(org.springframework.web.servlet.DispatcherServlet dispatcherServlet, @Nullable List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)
  • Method Details

    • doFilterInternal

      protected void doFilterInternal(@NonNull @NonNull jakarta.servlet.http.HttpServletRequest request, @NonNull @NonNull jakarta.servlet.http.HttpServletResponse response, @NonNull @NonNull jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException
      Specified by:
      doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
      Throws:
      jakarta.servlet.ServletException
      IOException
    • handleException

      protected void handleException(@NonNull @NonNull jakarta.servlet.http.HttpServletRequest request, @NonNull @NonNull jakarta.servlet.http.HttpServletResponse response, RuntimeException ex)
    • determineHandler

      protected Object determineHandler(@NonNull @NonNull jakarta.servlet.http.HttpServletRequest request, RuntimeException ex)
    • getDispatcherServlet

      protected org.springframework.web.servlet.DispatcherServlet getDispatcherServlet()
    • getExceptionResolvers

      @Nullable protected List<org.springframework.web.servlet.HandlerExceptionResolver> getExceptionResolvers()