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

Method main

ch2/YoilTellerMVC6.java:23–40  ·  view source on GitHub ↗
(MyDate date, BindingResult result)

Source from the content-addressed store, hash-verified

21 }
22
23 @RequestMapping("/getYoilMVC6") // http://localhost/ch2/getYoilMVC6
24// public String main(@ModelAttribute("myDate") MyDate date, Model model) {
25 public String main(MyDate date, BindingResult result) {
26System.out.println("result="+result);
27 // 1. 유효성 검사
28 if(!isValid(date))
29 return "yoilError"; // 유효하지 않으면, /WEB-INF/views/yoilError.jsp로 이동
30
31 // 2. 처리
32// char yoil = getYoil(date);
33
34 // 3. Model에 작업 결과 저장
35// model.addAttribute("myDate", date);
36// model.addAttribute("yoil", yoil);
37
38 // 4. 작업 결과를 보여줄 View의 이름을 반환
39 return "yoil"; // /WEB-INF/views/yoil.jsp
40 }
41
42
43 private @ModelAttribute("yoil") char getYoil(MyDate date) {

Callers

nothing calls this directly

Calls 1

isValidMethod · 0.95

Tested by

no test coverage detected