Spring6开始需要加@RequestParam("name"),否则报错。
<html>
<head>
<title>Title</title>
</head>
<body>
<form action="/e1/t1" method="post">
<input type="text" name="name">
<input type="submit">
</form>
</body>
</html>
@Controller
public class EncodingTest {
@PostMapping("/e1/t1")
public String test1(@RequestParam("name") String name, Model model){
model.addAttribute("msg",name);
return "hello111111";
}
}