Spring Boot2--Web開發(二)

註解@PathVariable用於從請求URL中獲取參數並映射到方法參數中,如下代碼: @Controller @RequestMapping("/user/{id}") public class HelloworldController { @Autowired UserService userService; @GetMapping(path="/{type}/get.json")
相關文章
相關標籤/搜索