html 빈칸에다 채우고 싶으면 모델을 써라
@GetMapping("/calc21")
//calc21.html에 v1 v2 타임리프로 정의됨
//모델은 알아서 처리해줌
String showCalc21(Model model) {
model.addAttribute("v1","v1값");
model.addAttribute("v2","v2값");
return "calc21";
}
calc21.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>calc21</title>
</head>
<body>
<div>
<input type="text" placeholder="내용" th:value="${v1}">
</div>
<div>
<input type="text" placeholder="내용" th:value="${v1}">
</div>
</body>
</html>