url傳遞多參數到spring mvc處理

jsp頁面spring

window.location.href="${contextPath}/tts/stock/tradingstrategy/save/"+name+"&"+shortName+"&"+code;mvc

 

spring mvc後臺app

@RequestMapping(value = "save/{name}&{shortName}&{code}", method = RequestMethod.GET)
 @ResponseBody
 public String preCreate4( @PathVariable String name, @PathVariable String shortName, @PathVariable String code) {
  System.out.println("name:"+name+"shortName:"+shortName+"code:"+code);
  return Editor;
 }jsp

相關文章
相關標籤/搜索