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

Method main7

ch2/RequestParamTest.java:67–73  ·  view source on GitHub ↗
(@RequestParam int year)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected