クラス AbstractFilterRegistrationBean<T extends FilterEE>
java.lang.ObjectSE
org.springframework.boot.web.servlet.RegistrationBean
org.springframework.boot.web.servlet.DynamicRegistrationBean<FilterRegistration.DynamicEE>
org.springframework.boot.web.servlet.AbstractFilterRegistrationBean<T>
- 型パラメーター:
T
- 登録するFilter
EE の型
- 実装されたすべてのインターフェース:
Aware
、BeanNameAware
、ServletContextInitializer
、Ordered
public abstract class AbstractFilterRegistrationBean<T extends FilterEE>
extends DynamicRegistrationBean<FilterRegistration.DynamicEE>
ベース
ServletContextInitializer
を抽象化して、Filter
EE を Servlet 3.0+ コンテナーに登録します。- 導入:
- 1.5.22
- 作成者:
- Phillip Webb, Brian Clozel
フィールドサマリー
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
メソッドのサマリー
修飾子と型メソッド説明protected FilterRegistration.DynamicEE
addRegistration
(StringSE description, ServletContextEE servletContext) void
addServletNames
(StringSE... servletNames) フィルターのサーブレット名を追加します。void
addServletRegistrationBeans
(ServletRegistrationBean<?>... servletRegistrationBeans) フィルターにServletRegistrationBean
を追加します。void
addUrlPatterns
(StringSE... urlPatterns) サーブレット仕様で定義されているように、フィルターが登録される URL パターンを追加します。protected void
configure
(FilterRegistration.DynamicEE registration) 登録設定を構成します。フィルターを登録する必要があるdispatcher types
EE を決定します。protected StringSE
登録の説明を返します。abstract T
登録するFilter
EE を返します。登録されるフィルター名を返します。フィルターが登録されるサーブレット名の可変コレクションを返します。フィルターが登録されるServletRegistrationBean
の可変コレクションを返します。フィルターが登録されるサーブレット仕様で定義されている URL パターンの変更可能なコレクションを返します。boolean
ServletContext の宣言されたフィルターマッピングの後にフィルターマッピングを一致させる必要がある場合に返します。void
setDispatcherTypes
(DispatcherTypeEE first, DispatcherTypeEE... rest) 指定された要素を使用したset dispatcher types
への簡易メソッド。void
setDispatcherTypes
(EnumSetSE<DispatcherTypeEE> dispatcherTypes) 登録で使用するディスパッチャー型を設定します。void
setMatchAfter
(boolean matchAfter) ServletContext の宣言されたフィルターマッピングの後にフィルターマッピングを一致させる必要がある場合に設定します。void
setServletNames
(CollectionSE<StringSE> servletNames) フィルターが登録されるサーブレット名を設定します。void
setServletRegistrationBeans
(CollectionSE<? extends ServletRegistrationBean<?>> servletRegistrationBeans) フィルターが登録されるServletRegistrationBean
を設定します。void
setUrlPatterns
(CollectionSE<StringSE> urlPatterns) フィルターが登録される URL パターンを設定します。toString()
クラス org.springframework.boot.web.servlet.DynamicRegistrationBean から継承されたメソッド
addInitParameter, getInitParameters, getOrDeduceName, isAsyncSupported, register, setAsyncSupported, setBeanName, setIgnoreRegistrationFailure, setInitParameters, setName
クラス org.springframework.boot.web.servlet.RegistrationBean から継承されたメソッド
getOrder, isEnabled, onStartup, setEnabled, setOrder
メソッドの詳細
setServletRegistrationBeans
public void setServletRegistrationBeans(CollectionSE<? extends ServletRegistrationBean<?>> servletRegistrationBeans) フィルターが登録されるServletRegistrationBean
を設定します。- パラメーター:
servletRegistrationBeans
- サーブレット登録 Bean
getServletRegistrationBeans
フィルターが登録されるServletRegistrationBean
の可変コレクションを返します。ServletRegistrationBean
s。addServletRegistrationBeans
フィルターにServletRegistrationBean
を追加します。- パラメーター:
servletRegistrationBeans
- 追加するサーブレット登録 Bean- 関連事項:
setServletNames
フィルターが登録されるサーブレット名を設定します。これにより、以前に指定されたサーブレット名が置き換えられます。getServletNames
フィルターが登録されるサーブレット名の可変コレクションを返します。- 戻り値:
- サーブレット名
addServletNames
フィルターのサーブレット名を追加します。- パラメーター:
servletNames
- 追加するサーブレット名
setUrlPatterns
フィルターが登録される URL パターンを設定します。これは、以前に指定された URL パターンを置き換えます。getUrlPatterns
フィルターが登録されるサーブレット仕様で定義されている URL パターンの変更可能なコレクションを返します。- 戻り値:
- URL パターン
addUrlPatterns
サーブレット仕様で定義されているように、フィルターが登録される URL パターンを追加します。- パラメーター:
urlPatterns
- URL パターン
determineDispatcherTypes
フィルターを登録する必要があるdispatcher types
EE を決定します。何も設定されていない場合は、登録されているフィルターの型に基づいてデフォルトを適用します。返されたEnumSet
SE を変更しても、登録には影響しません。- 戻り値:
- ディスパッチャーの型 (決して
null
ではない) - 導入:
- 3.2.0
setDispatcherTypes
指定された要素を使用したset dispatcher types
への簡易メソッド。- パラメーター:
first
- 最初のディスパッチャー型rest
- 追加のディスパッチャー型
setDispatcherTypes
登録で使用するディスパッチャー型を設定します。- パラメーター:
dispatcherTypes
- ディスパッチャーの型
setMatchAfter
public void setMatchAfter(boolean matchAfter) ServletContext の宣言されたフィルターマッピングの後にフィルターマッピングを一致させる必要がある場合に設定します。デフォルトはfalse
で、ServletContext の宣言されたフィルターマッピングの前にフィルターが一致することを示します。- パラメーター:
matchAfter
- フィルターマッピングが後に一致する場合
isMatchAfter
public boolean isMatchAfter()ServletContext の宣言されたフィルターマッピングの後にフィルターマッピングを一致させる必要がある場合に返します。- 戻り値:
- フィルターマッピングが後に一致する場合
getDescription
クラスからコピーされた説明:RegistrationBean
登録の説明を返します。たとえば、「サーブレット resourceServlet」- 次で指定:
- クラス
RegistrationBean
のgetDescription
- 戻り値:
- 登録の説明
addRegistration
protected FilterRegistration.DynamicEE addRegistration(StringSE description, ServletContextEE servletContext) configure
登録設定を構成します。必要に応じて、サブクラスはこのメソッドをオーバーライドして追加の構成を実行できます。- オーバーライド:
- クラス
DynamicRegistrationBean<FilterRegistration.DynamicEE>
のconfigure
- パラメーター:
registration
- 登録
getFilter
登録するFilter
EE を返します。- 戻り値:
- フィルター
getFilterName
登録されるフィルター名を返します。- 戻り値:
- フィルター名
- 導入:
- 3.2.0
toString