MCPcopy Create free account
hub / github.com/castello/spring_basic / main11

Method main11

ch2/RequestParamTest.java:99–105  ·  view source on GitHub ↗
(@RequestParam(required=false, defaultValue="1") int year)

Source from the content-addressed store, hash-verified

97 }
98
99 @RequestMapping("/requestParam11")
100 public String main11(@RequestParam(required=false, defaultValue="1") int year) {
101// http://localhost/ch2/requestParam11 ---->> year=1
102// http://localhost/ch2/requestParam11?year ---->> 400 Bad Request, nested exception is java.lang.NumberFormatException: For input string: ""
103 System.out.printf("[%s]year=[%s]%n", new Date(), year);
104 return "yoil";
105 }
106} // class

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected