@ Controller
@ RequestMapping ("/test ")
Public class UserController {
@ RequestMapping (value="https://bbs.csdn.net/save", method=RequestMethod. POST)
Public String saveUser (User User) {
System.out.println(user);
Return "success";
}
@ RequestMapping (value="https://bbs.csdn.net/test", method=RequestMethod. POST)
Public String testUser with User (User) {
System.out.println(user);
System. The out. Println (" Oakley ");
Return "success";
}
@ RequestMapping (value="https://bbs.csdn.net/save01", method=RequestMethod. POST)
Public String saveUser1 User (User) {
System.out.println(user);
Return "success";
}
}
Index01.
JSP code
<% @ page language="Java" contentType="text/HTML. Charset=utf-8 "
PageEncoding="utf-8" % & gt;
<meta charset="utf-8" & gt;
<body>
Password: & lt; Input name="loginPwd" type="text" & gt;
Provinces: & lt; Input name="address. The province" type="text" & gt;
City: & lt; The input name="address. City" type="text" & gt;