public class ViewControllerRegistry extends ObjectSE
| コンストラクターと説明 |
|---|
ViewControllerRegistry(ApplicationContext applicationContext)ApplicationContext を使用したクラスコンストラクター。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
RedirectViewControllerRegistration | addRedirectViewController(StringSE urlPath, StringSE redirectUrl) 別の URL にリダイレクトするために、ビューコントローラーを特定の URL パス(またはパターン)にマップします。 |
void | addStatusController(StringSE urlPath, HttpStatus statusCode) 本文をレンダリングせずにレスポンスステータスを特定のコードに設定するには、単純なコントローラーを特定の URL パス(またはパターン)にマップします。 |
ViewControllerRegistration | addViewController(StringSE urlPath) 事前設定されたステータスコードとビューを使用してレスポンスをレンダリングするために、ビューコントローラーを特定の URL パス(またはパターン)にマップします。 |
protected SimpleUrlHandlerMapping | buildHandlerMapping() 登録済みの View Controller マッピングを含む HandlerMapping、または登録なしの null を返します。 |
void | setOrder(int order)Spring MVC で構成された他のハンドラーマッピングに対してビューコントローラーをマップするために使用される HandlerMapping に使用する順序を指定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic ViewControllerRegistry(@Nullable ApplicationContext applicationContext)
ApplicationContext を使用したクラスコンストラクター。public ViewControllerRegistration addViewController(StringSE urlPath)
"/admin/**" または "/articles/{articlename:\\w+}" のようなパターンが許可されます。構文の詳細については、AntPathMatcher を参照してください。
public RedirectViewControllerRegistration addRedirectViewController(StringSE urlPath, StringSE redirectUrl)
public void addStatusController(StringSE urlPath, HttpStatus statusCode)
public void setOrder(int order)
HandlerMapping に使用する順序を指定します。デフォルトでは、これは 1 に設定されています。つまり、0 で並べられたアノテーション付きコントローラーの直後です。
@Nullable protected SimpleUrlHandlerMapping buildHandlerMapping()
HandlerMapping、または登録なしの null を返します。