Model
Model의 활용법에 대해서 살펴본다
Model이란
Controller & View 생성
Controller mapping 생성
@RequestMapping("/modelTest")
public String modelTest(Model model) {
model.addAttribute("testString", "Hello Spring Boot");
model.addAttribute("testNumber", 12321);
return "modelTest";
}
JSP View 생성

결과 확인

결론
Last updated