當前位置: 首頁>>代碼示例>>Java>>正文


Java RedirectView.setPropagateQueryParams方法代碼示例

本文整理匯總了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;
}
 
開發者ID:Just-Fun,項目名稱:spring-data-examples,代碼行數:26,代碼來源:UserController.java

示例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;
}
 
開發者ID:csap-platform,項目名稱:csap-core,代碼行數:15,代碼來源:Redirects.java

示例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;
}
 
開發者ID:csap-platform,項目名稱:csap-core,代碼行數:21,代碼來源:Redirects.java


注:本文中的org.springframework.web.servlet.view.RedirectView.setPropagateQueryParams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。