How does springMVC pass values?

1. Specify which layer to go to by passing the value through the foreground form, and use the @RequestParam annotation

 1 //例如:
 2 @Controller 
 3 public class a{
 4 
 5 @RequestMapping("/login") 
 6  public String login(@RequestParam("username") String username,  
 7                         @RequestParam("password") String password,Model model){
 8     
 9      model.addAttribute("username", username);  
10     return "";
11 }

 

This is used for form submission

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325818195&siteId=291194637