
[Thymeleaf] 기본 문법
·
Web & Android/Thymeleaf
th:text 화면에 데이터 출력 textarea에 넘겨받은 변수값을 표시할 때 사용한다. th:value로 하면 안뜬다. 예제1 Hello World!!! 스프링 부트 수업 중 @Controller public class ThymeleafController { @GetMapping("/thymeleaf/ex1") public String ex1(Model model) { model.addAttribute("data", "SpringBoot Study"); return "thymeleaf/ex1"; } } // 출력 결과 // SpringBoot Study 예제2 Hello World!!! 스프링 부트 수업 중 @Controller public class ThymeleafController { @GetM..