Spring Boot2--Web开发(二)

注解@PathVariable用于从请求URL中获取参数并映射到方法参数中,如下代码: @Controller @RequestMapping("/user/{id}") public class HelloworldController { @Autowired UserService userService; @GetMapping(path="/{type}/get.json")
相关文章
相关标签/搜索