本文整理汇总了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;
}