1.通过request.getParmater();
String id = request.getParamter("id");
String username = request.getParamter("username");
2.@RequestMapping("/hanlder/{id}") // http://localhost:8080/upload/hanlder/2.action 会把2注入给id
public String hander(@PathVariable("id") Integer id) {
system.out.println(id);
}
3.@RequestMapping("/handler") // http://localhost:8080/upload/handler.action?id=3 会把3注入给id
public String handler2(Integer id){
}
4. @RequerstMapping("/handler3")
public String handler3(User user){
}