Class RighterInterceptor

  • All Implemented Interfaces:
    org.springframework.core.Ordered , org.springframework.web.servlet.HandlerInterceptor , pro.fessional.wings.slardar.webmvc.AutoRegisterInterceptor

    
    public class RighterInterceptor
     implements AutoRegisterInterceptor
                        
    Since:

    2019-11-16

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface RighterInterceptor.SecretProvider

      Use RighterInterceptor.Secret if return `null`

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getOrder()
      void setOrder(int order)
      RighterInterceptor.SecretProvider getSecretProvider() Get the encryption password by HttpSession
      void setSecretProvider(RighterInterceptor.SecretProvider secretProvider) Get the encryption password by HttpSession
      boolean preHandle(@NotNull() HttpServletRequest request, @NotNull() HttpServletResponse response, @NotNull() Object handler)
      void postHandle(@NotNull() HttpServletRequest request, @NotNull() HttpServletResponse response, @NotNull() Object handler, ModelAndView modelAndView) Note that postHandle is less useful with @ResponseBody and ResponseEntity methods for which the response is written and committed within the HandlerAdapter and before postHandle.
      • Methods inherited from class pro.fessional.wings.slardar.webmvc.AutoRegisterInterceptor

        getExcludePatterns, getIncludePatterns
      • Methods inherited from class org.springframework.web.servlet.HandlerInterceptor

        afterCompletion
      • Methods inherited from class org.springframework.core.Ordered

        getOrder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • preHandle

         boolean preHandle(@NotNull() HttpServletRequest request, @NotNull() HttpServletResponse response, @NotNull() Object handler)
      • postHandle

         void postHandle(@NotNull() HttpServletRequest request, @NotNull() HttpServletResponse response, @NotNull() Object handler, ModelAndView modelAndView)

        Note that postHandle is less useful with @ResponseBody and ResponseEntity methods for which the response is written and committed within the HandlerAdapter and before postHandle. That means it is too late to make any changes to the response, such as adding an extra header. For such scenarios, you can implement ResponseBodyAdvice and either declare it as an Controller Advice bean or configure it directly on RequestMappingHandlerAdapter