목차
[Thymeleaf
Integrations galore Eclipse, IntelliJ IDEA, Spring, Play, even the up-and-coming Model-View-Controller API for Java EE 8. Write Thymeleaf in your favourite tools, using your favourite web-development framework. Check out our Ecosystem to see more integrati
www.thymeleaf.org](https://www.thymeleaf.org/)
pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
ProjectApplication
@Controller
@SpringBootApplication
public class Sts07Application {
public static void main(String[] args) {
SpringApplication.run(Sts07Application.class, args);
}
@GetMapping("/test1")
public String test1(Model model) {
model.addAttribute("msg", "Hello World");
return "test1";
}
}
resources>template>html
<!DOCCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>thymeleaf</title>
</head>
<body>
<h1 th:text="${msg}">thymeleaf로 view 출력</h1>
</body>
</html>
resources>static>html
<!DOCCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>thymeleaf</title>
</head>
<body>
<h1>static page</h1>
</body>
</html>
'100일 챌린지 > 빅데이터기반 인공지능 융합 서비스 개발자' 카테고리의 다른 글
Day 72 - docker로 배포하기 (0) | 2024.11.11 |
---|---|
Day 72 - Annotation을 사용해서 CRUD 프로젝트 만들기 (0) | 2024.11.11 |
Day 72 - SpringBoot에서 Mybatis 사용하기 (0) | 2024.11.11 |
Day 72 - Spring Boot 로 프로그램 만들기 (0) | 2024.11.11 |
Day 72 - spring boot 로 웹사이트 만들기 (0) | 2024.11.11 |