クラス RedirectViewControllerRegistration

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

public class RedirectViewControllerRegistration extends ObjectSE
単一のリダイレクトビューコントローラーの登録を支援します。
導入:
4.1
作成者:
Rossen Stoyanchev
  • コンストラクターの詳細

    • RedirectViewControllerRegistration

      public RedirectViewControllerRegistration(StringSE urlPath, StringSE redirectUrl)
  • メソッドの詳細

    • setStatusCode

      public RedirectViewControllerRegistration setStatusCode(HttpStatusCode statusCode)
      使用する特定のリダイレクト 3xx ステータスコードを設定します。

      設定しない場合、RedirectView はデフォルトで HttpStatus.MOVED_TEMPORARILY (302) を選択します。

    • setContextRelative

      public RedirectViewControllerRegistration setContextRelative(boolean contextRelative)
      スラッシュ("/")で始まる所定のリダイレクト URL を、現在の ServletContext を基準として、つまり Web アプリケーションのルートを基準として解釈するかどうか。

      デフォルトは true です。

    • setKeepQueryParams

      public RedirectViewControllerRegistration setKeepQueryParams(boolean propagate)
      現在のリクエストのクエリパラメーターをターゲットリダイレクト URL に伝播するかどうか。

      デフォルトは false です。

    • setApplicationContext

      protected void setApplicationContext(@Nullable ApplicationContext applicationContext)
    • getUrlPath

      protected StringSE getUrlPath()
    • getViewController

      protected ParameterizableViewController getViewController()