クラス InterceptorRegistration

java.lang.ObjectSE
org.springframework.web.servlet.config.annotation.InterceptorRegistration

public class InterceptorRegistration extends ObjectSE
MappedInterceptor の作成を支援します。
導入:
3.1
作成者:
Rossen Stoyanchev, Keith Donald
  • コンストラクターの詳細

  • メソッドの詳細

    • addPathPatterns

      public InterceptorRegistration addPathPatterns(StringSE... patterns)
      インターセプターを含める必要がある URL のパターンを追加します。

      パターン構文については、解析されたパターンが enabled の場合は PathPattern を、それ以外の場合は AntPathMatcher を参照してください。構文はほぼ同じで、PathPattern は Web の使用に合わせて調整され、より効率的です。

    • addPathPatterns

      public InterceptorRegistration addPathPatterns(ListSE<StringSE> patterns)
      addPathPatterns(String...) のリストベースのバリアント。
      導入:
      5.0.3
    • excludePathPatterns

      public InterceptorRegistration excludePathPatterns(StringSE... patterns)
      インターセプターを除外する必要がある URL のパターンを追加します。

      パターン構文については、解析されたパターンが enabled の場合は PathPattern を、それ以外の場合は AntPathMatcher を参照してください。構文はほぼ同じで、PathPattern は Web の使用に合わせて調整され、より効率的です。

    • excludePathPatterns

      public InterceptorRegistration excludePathPatterns(ListSE<StringSE> patterns)
      excludePathPatterns(String...) のリストベースのバリアント。
      導入:
      5.0.3
    • pathMatcher

      public InterceptorRegistration pathMatcher(PathMatcher pathMatcher)
      URL パスを包含および除外パターンと照合するために使用するように PathMatcher を構成します。

      これは、カスタマイズされた AntPathMatcher またはカスタム PathMatcher が必要な場合にのみ使用する必要がある高度なプロパティです。

      デフォルトでは、これは AntPathMatcher です。

      注意 PathMatcher を設定すると、parsed RequestPath が使用可能な場合でも、文字列パターンマッチングの使用が強制されます。

    • order

      public InterceptorRegistration order(int order)
      使用するオーダー位置を指定します。デフォルトは 0 です。
      導入:
      4.3.23
    • getOrder

      protected int getOrder()
      使用するオーダー位置を返します。
    • getInterceptor

      protected ObjectSE getInterceptor()
      基礎となるインターセプターを構築します。URL パターンが提供されている場合、返される型は MappedInterceptor です。それ以外の場合は HandlerInterceptor