Web入门
@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";
}
参数传递
数据响应
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!