When springmvc's controller gets parameters, what's the difference between the following two ways? why add the @ parameter?

1. Write the parameters of the form directly in the formal parameters of the corresponding method of Controller
public String addUser1 (String username,String password)
and bind the request parameter
public String addUser6 (@ RequestParam ("username") String username)

) with the annotation @ RequestParam

2. Receive
public String addUser3 (UserModel user)
and FORM form data
public String addUser5 (@ ModelAttribute ("user") UserModel user)

) of the POST request using the @ ModelAttribute annotation through a bean
Feb.28,2021

@ RequestParam: if @ RequestParam is used in the method, the argument will only be injected into the parameter labeled @ RequestParam

bean: is automatically injected into the parameter that satisfies the argument name

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34d6b-2b791.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34d6b-2b791.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?