クラス AbstractRequestMatcherRegistry<C>

java.lang.ObjectSE
org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry<C>
型パラメーター:
C - RequestMatcher の作成後に返される、またはチェーンされるオブジェクト
既知の直属サブクラス
AbstractConfigAttributeRequestMatcherRegistryAuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistryHttpSecurity.RequestMatcherConfigurerWebSecurity.IgnoredRequestConfigurer

public abstract class AbstractRequestMatcherRegistry<C> extends ObjectSE
RequestMatcher を登録するための基本クラス。例: 特定のレベルの認可が必要な RequestMatcher を指定できる場合があります。
導入:
3.2
  • コンストラクターの詳細

    • AbstractRequestMatcherRegistry

      public AbstractRequestMatcherRegistry()
  • メソッドの詳細

    • setApplicationContext

      protected final void setApplicationContext(org.springframework.context.ApplicationContext context)
    • getApplicationContext

      protected final org.springframework.context.ApplicationContext getApplicationContext()
      ApplicationContext を取得します
      戻り値:
      ApplicationContext
    • anyRequest

      public C anyRequest()
      リクエストをマッピングします。
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
    • createMvcMatchers

      protected final ListSE<MvcRequestMatcher> createMvcMatchers(org.springframework.http.HttpMethod method, StringSE... mvcPatterns)
      渡されたメソッドとパターンの MvcRequestMatcher インスタンスを作成します
      パラメーター:
      method - 使用する HTTP メソッド、または使用する必要がある場合は null
      mvcPatterns - 一致する Spring MVC パターン
      戻り値:
      MvcRequestMatcher インスタンスのリスト
    • dispatcherTypeMatchers

      public C dispatcherTypeMatchers(@Nullable org.springframework.http.HttpMethod method, jakarta.servlet.DispatcherType... dispatcherTypes)
      DispatcherTypeRequestMatcher インスタンスの ListSE をマップします。
      パラメーター:
      method - 使用する HttpMethod または任意の HttpMethod の null 
      dispatcherTypes - 照合するディスパッチャー型
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
    • dispatcherTypeMatchers

      public C dispatcherTypeMatchers(jakarta.servlet.DispatcherType... dispatcherTypes)
      HttpMethod を指定しない DispatcherTypeRequestMatcher インスタンスの ListSE を作成します。
      パラメーター:
      dispatcherTypes - 照合するディスパッチャー型
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
    • requestMatchers

      public C requestMatchers(RequestMatcher... requestMatchers)
      RequestMatcher インスタンスのリストを AbstractConfigAttributeRequestMatcherRegistry に関連付けます
      パラメーター:
      requestMatchers - RequestMatcher インスタンス
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
    • requestMatchers

      public C requestMatchers(org.springframework.http.HttpMethod method, StringSE... patterns)

      HandlerMappingIntrospector がクラスパスで使用可能な場合、一致する特定の HttpMethod も指定する MvcRequestMatcher にマップされます。このマッチャーは、Spring MVC がマッチングに使用するのと同じルールを使用します。例: 多くの場合、パス "/path" のマッピングは、"/path","/path/","/path.html" などで一致します。HandlerMappingIntrospector が使用できない場合は、AntPathRequestMatcher にマップします。

      特定の RequestMatcher を指定する必要がある場合は、代わりに requestMatchers(RequestMatcher...) を使用してください

      パラメーター:
      method - 使用する HttpMethod または任意の HttpMethod の null 
      patterns - 一致するパターン。MvcRequestMatcher が使用されている場合、マッチングのルールは Spring MVC によって定義されます。
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
      導入:
      5.8
    • requestMatchers

      public C requestMatchers(StringSE... patterns)

      HandlerMappingIntrospector がクラスパスで使用可能な場合、どの HttpMethod が使用されているかを気にしない MvcRequestMatcher にマップされます。このマッチャーは、Spring MVC がマッチングに使用するのと同じルールを使用します。例: 多くの場合、パス "/path" のマッピングは、"/path","/path/","/path.html" などで一致します。HandlerMappingIntrospector が使用できない場合は、AntPathRequestMatcher にマップします。

      特定の RequestMatcher を指定する必要がある場合は、代わりに requestMatchers(RequestMatcher...) を使用してください

      パラメーター:
      patterns - 一致するパターン。MvcRequestMatcher が使用されている場合、マッチングのルールは Spring MVC によって定義されます。
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
      導入:
      5.8
    • requestMatchers

      public C requestMatchers(org.springframework.http.HttpMethod method)

      HandlerMappingIntrospector がクラスパスで使用可能な場合、特定の HttpMethod で一致する MvcRequestMatcher にマップされます。このマッチャーは、Spring MVC がマッチングに使用するのと同じルールを使用します。例: 多くの場合、パス "/path" のマッピングは、"/path","/path/","/path.html" などで一致します。HandlerMappingIntrospector が使用できない場合は、AntPathRequestMatcher にマップします。

      特定の RequestMatcher を指定する必要がある場合は、代わりに requestMatchers(RequestMatcher...) を使用してください

      パラメーター:
      method - 使用する HttpMethod または任意の HttpMethod の null 
      戻り値:
      RequestMatcher の作成後にチェーンされるオブジェクト
      導入:
      5.8
    • chainRequestMatchers

      protected abstract C chainRequestMatchers(ListSE<RequestMatcher> requestMatchers)
      サブクラスは、RequestMatcher インスタンスの作成にチェーンされたオブジェクトを返すためにこのメソッドを実装する必要があります。
      パラメーター:
      requestMatchers - 作成された RequestMatcher インスタンス
      戻り値:
      RequestMatcher への何かの関連付けを可能にするサブクラスのチェーンオブジェクト