Annotation Interface Interceptor


@Component @Target(TYPE) @Retention(RUNTIME) public @interface Interceptor
A custom Component annotation for HandlerInterceptor and the interceptor would be auto-detects by a custom a WebMvcConfigurer.
 @Interceptor(includes="/**")
 public class MyHandlerInterceptor implements HandlerInterceptor{
     ...
 }
 
从以下版本开始:
1.0.0
版本:
1.0.0
作者:
ilikly
另请参阅:
  • InterceptorRegistration
  • HandlerInterceptor
  • WebMvcConfigurer.addInterceptors(InterceptorRegistry)
  • 元素详细资料

    • value

      @AliasFor(annotation=org.springframework.stereotype.Component.class) String value
      默认值:
      ""
    • includes

      String[] includes
      return the path patterns.
      返回:
      the path patterns.
      另请参阅:
      • InterceptorRegistration.addPathPatterns(String...)
      • InterceptorRegistration.addPathPatterns(List)
      默认值:
      {}
    • excludes

      String[] excludes
      return exclude path patterns.
      返回:
      exclude path patterns.
      另请参阅:
      • InterceptorRegistration.excludePathPatterns(String...)
      • InterceptorRegistration.excludePathPatterns(List)
      默认值:
      {}