(int year)
| 57 | // ======================================================================= |
| 58 | |
| 59 | @RequestMapping("/requestParam6") |
| 60 | public String main6(int year) { |
| 61 | // http://localhost/ch2/requestParam6 ---->> 500 java.lang.IllegalStateException: Optional int parameter 'year' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type. |
| 62 | // http://localhost/ch2/requestParam6?year ---->> 400 Bad Request, nested exception is java.lang.NumberFormatException: For input string: "" |
| 63 | System.out.printf("[%s]year=[%s]%n", new Date(), year); |
| 64 | return "yoil"; |
| 65 | } |
| 66 | |
| 67 | @RequestMapping("/requestParam7") |
| 68 | public String main7(@RequestParam int year) { |
nothing calls this directly
no outgoing calls
no test coverage detected