摘要: 页面提交的请求数据(get,post)都可以和对象属性进行绑定 @PostMapping("/saveUser") public Person saveUser(Person person){ return person; } 阅读全文
posted @ 2022-09-25 22:28 Mr_sven 阅读(10) 评论(0) 推荐(0) 编辑
摘要: Map<String,Object> map、Model model、HttpServletRequest request都是可以给request域中放数据,再用request.getAttribute取数据 package com.java.boot.controller; import org. 阅读全文
posted @ 2022-09-25 21:11 Mr_sven 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 路径变量@PathVariable ①获取指定路径变量: @GetMapping("/car/{id}/owner/{userName}") public Map<String,Object> getCar(@PathVariable("id") int id, @PathVariable("use 阅读全文
posted @ 2022-09-25 14:02 Mr_sven 阅读(112) 评论(0) 推荐(0) 编辑