(@RequestParam String year)
| 30 | } |
| 31 | |
| 32 | @RequestMapping("/requestParam3") |
| 33 | // public String main3(@RequestParam(name="year", required=true) String year) { // 아래와 동일 |
| 34 | public String main3(@RequestParam String year) { |
| 35 | // http://localhost/ch2/requestParam3 ---->> year=null 400 Bad Request. required=true라서 |
| 36 | // http://localhost/ch2/requestParam3?year ---->> year="" |
| 37 | System.out.printf("[%s]year=[%s]%n", new Date(), year); |
| 38 | return "yoil"; |
| 39 | } |
| 40 | |
| 41 | @RequestMapping("/requestParam4") |
| 42 | public String main4(@RequestParam(required=false) String year) { |
nothing calls this directly
no outgoing calls
no test coverage detected