此篇提到的是:註記
不僅簡化許多功能
更能重於開發
以下整理出比較常用幾點
| @Controllel | 將此 Controller 註冊到 Spring MVC 內 |
| @RequestMapping | 指定處理哪些 URL 請求 |
| @RequestBody | 可讀取 Request 數據 |
| @ResponeseBody | 可返回 ResponeseBody 參數 |
| @ModelAttribute | 讀取模型化數據 |
| @RequestParam | 讀取請求參數的變數 |
| @PathVariable | |
| @ExceptionHandler | |
| @ControllerAdvice |
沒有留言:
張貼留言