(@RequestParam int year)
| 65 | } |
| 66 | |
| 67 | @RequestMapping("/requestParam7") |
| 68 | public String main7(@RequestParam int year) { |
| 69 | // http://localhost/ch2/requestParam7 ---->> 400 Bad Request, Required int parameter 'year' is not present |
| 70 | // http://localhost/ch2/requestParam7?year ---->> 400 Bad Request, nested exception is java.lang.NumberFormatException: For input string: "" |
| 71 | System.out.printf("[%s]year=[%s]%n", new Date(), year); |
| 72 | return "yoil"; |
| 73 | } |
| 74 | |
| 75 | @RequestMapping("/requestParam8") |
| 76 | public String main8(@RequestParam(required=false) int year) { |
nothing calls this directly
no outgoing calls
no test coverage detected