本文整理匯總了Java中org.springframework.web.servlet.view.RedirectView.setPropagateQueryParams方法的典型用法代碼示例。如果您正苦於以下問題:Java RedirectView.setPropagateQueryParams方法的具體用法?Java RedirectView.setPropagateQueryParams怎麽用?Java RedirectView.setPropagateQueryParams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.web.servlet.view.RedirectView
的用法示例。
在下文中一共展示了RedirectView.setPropagateQueryParams方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: register
import org.springframework.web.servlet.view.RedirectView; //導入方法依賴的package包/類
/**
* Registers a new {@link User} for the data provided by the given {@link UserForm}. Note, how an interface is used to
* bind request parameters.
*
* @param userForm the request data bound to the {@link UserForm} instance.
* @param binding the result of the binding operation.
* @param model the Spring MVC {@link Model}.
* @return
*/
@RequestMapping(method = RequestMethod.POST)
public Object register(UserForm userForm, BindingResult binding, Model model) {
userForm.validate(binding, userManagement);
if (binding.hasErrors()) {
return "users";
}
userManagement.register(new Username(userForm.getUsername()), Password.raw(userForm.getPassword()));
RedirectView redirectView = new RedirectView("redirect:/users");
redirectView.setPropagateQueryParams(true);
return redirectView;
}
示例2: screencastLogin
import org.springframework.web.servlet.view.RedirectView; //導入方法依賴的package包/類
@RequestMapping("/screencast")
public ModelAndView screencastLogin(
@RequestParam(value = "item", required = false) String item,
@RequestParam(value = "wiki", required = false) String wiki
) {
RedirectView redirectView = new RedirectView();
redirectView.setContextRelative( false );
redirectView.setPropagateQueryParams( true );
redirectView.setUrl( csapApp.lifeCycleSettings().getToolsServer()+ "/admin/viewScreencast" );
ModelAndView mav = new ModelAndView(redirectView) ;
return mav;
}
示例3: ssoLogin
import org.springframework.web.servlet.view.RedirectView; //導入方法依賴的package包/類
/**
* Suppor for logins
* @param item
* @param wiki
* @return
*/
@RequestMapping("/ssoLogin")
public ModelAndView ssoLogin(
@RequestParam(value = "ref", required = false) String refUrl
) {
RedirectView redirectView = new RedirectView();
redirectView.setContextRelative( false );
redirectView.setPropagateQueryParams( true );
redirectView.setUrl( refUrl );
ModelAndView mav = new ModelAndView(redirectView) ;
return mav;
}