Use Case:
✅ Admin dashboard
✅ Internal tools
✅ Simple web apps
✅ SEO-heavy pages
❌ Large SPA (React / Vue)
❌ Highly interactive UI
pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
Folder structure
src/main/resources/
├─ templates/ ← thymeleaf html files
└─ static/ ← css, js, images
Controller send the view
@Controller
public class HomeController {
@GetMapping("/home")
public String home(Model model) {
model.addAttribute("name", "Min Hen");
return "home"; // home.html
}
}