(@RequestParam(required=true) int year)
| 81 | } |
| 82 | |
| 83 | @RequestMapping("/requestParam9") |
| 84 | public String main9(@RequestParam(required=true) int year) { |
| 85 | // http://localhost/ch2/requestParam9 ---->> 400 Bad Request, Required int parameter 'year' is not present |
| 86 | // http://localhost/ch2/requestParam9?year ---->> 400 Bad Request, nested exception is java.lang.NumberFormatException: For input string: "" |
| 87 | System.out.printf("[%s]year=[%s]%n", new Date(), year); |
| 88 | return "yoil"; |
| 89 | } |
| 90 | |
| 91 | @RequestMapping("/requestParam10") |
| 92 | public String main10(@RequestParam(required=true, defaultValue="1") int year) { |
nothing calls this directly
no outgoing calls
no test coverage detected