@RequestParam,@PathParam,@PathVariable等註解區別

@RequestParam 和 @PathVariable 註解是用於從request中接收請求的,兩個均可以接收參數,關鍵點不一樣的是@RequestParam 是從request裏面拿取值,而 @PathVariable 是從一個URI模板裏面來填充html @RequestParam 看下面一段代碼:java http://localhost:8080/springmvc/hello/101
相關文章
相關標籤/搜索