在文本字段发生变化时,jQuery 会调用 Spring Controller。我的问题是这个查询如何发送@RequestParam
到控制器方法controller/find
?
我如何能够Param
在此通话中发送更多信息?
$(document).ready(function() {
$( "#id" ).autocomplete({
source: "${pageContext. request. contextPath}/controller/find.htm"
});
});
这有效
@RequestMapping(value = "/find", method = RequestMethod.GET)
public @ResponseBody
List<String> findItem(@RequestParam("term") String id)
但需要类似的东西
@RequestMapping(value = "/find", method = RequestMethod.GET)
public @ResponseBody
List<String> findItem(@RequestParam("term") String id, Additional param here ??)