1.Form表单提交
@PostMapping("/getUser") @ResponseBody public String login(String id,String password){ System.out.println("id = " + id+"password="+ password); return "id = " + id+"password="+ password; }
2.AJax提交
Ajax提交
@RequestMapping(value = "getUser1",method = RequestMethod.POST) @ResponseBody public int getUser1(String username, String password){ System.out.println("id = " + username + ", password = " + password); return 1; }
随遇而安,你个嘚嘚
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)