url传递多参数到spring mvc处理

jsp页面

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

 

spring mvc后台

@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;
 }

你可能感兴趣的:(spring,mvc,url传递多参数)