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

Method main

ch2/RequestParamTest.java:13–21  ·  view source on GitHub ↗
(HttpServletRequest request)

Source from the content-addressed store, hash-verified

11@Controller
12public class RequestParamTest {
13 @RequestMapping("/requestParam")
14 public String main(HttpServletRequest request) {
15 String year = request.getParameter("year");
16// http://localhost/ch2/requestParam ---->> year=null
17// http://localhost/ch2/requestParam?year= ---->> year=""
18// http://localhost/ch2/requestParam?year ---->> year=""
19 System.out.printf("[%s]year=[%s]%n", new Date(), year);
20 return "yoil";
21 }
22
23 @RequestMapping("/requestParam2")
24// public String main2(@RequestParam(name="year", required=false) String year) { // 아래와 동일

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected