Class ExtendedMappingExceptionResolver

  • All Implemented Interfaces:
    Ordered, HandlerExceptionResolver

    public class ExtendedMappingExceptionResolver
    extends SimpleMappingExceptionResolver
    Custom Spring exception to view mapper that populates the view model with data obtained via an extension function.

    As a default, the view model will include a reference to the active HttpServletRequest and the HTMLEncoder class.

    • Constructor Detail

      • ExtendedMappingExceptionResolver

        public ExtendedMappingExceptionResolver()
        Constructor.
      • ExtendedMappingExceptionResolver

        public ExtendedMappingExceptionResolver​(@Nullable
                                                Function<javax.servlet.http.HttpServletRequest,​Map<String,​Object>> extender)
        Constructor.
        Parameters:
        extender - function to obtain extensions to view model
    • Method Detail

      • getModelAndView

        protected ModelAndView getModelAndView​(String viewName,
                                               Exception ex,
                                               javax.servlet.http.HttpServletRequest request)