在将文本框值从Angular Js发送到Spring控制器时,弹簧控制器无法处理名称为
的数据带有Anguler Js的html
<input type="text" id="txtBox" ng-model="myForm.txtBox" ng-minlength="6" ng-maxlength="6"> Name <br/>
$http(
{
method : 'POST',
url : './inc',
data : names
}).
@Controller
@RequestMapping("/inc")
public class Reciver {
@RequestMapping(method = RequestMethod.POST)
public @ResponseBody String m1(@RequestParam(value="names",required=true) String names1, Model model)
{....}