@GetMapping("/user")
public String user(ModelMap map){
map.addAttribute("name","zhang");
return "user";
}
<body>
<h1 th:text="'welcome:'+${name}"></h1>
</body>
@RequestMapping(
value = {"/user","/user2"},
method = RequestMethod.GET
)
public String user(){
return "user";
}
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)