<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj" -->

---
title: TodoMVC with Spring Boot and Thymeleaf (Part 1) | daily.dev
description: A step-by-step tutorial building a TodoMVC application using Spring Boot and Thymeleaf for server-side rendering instead of a JavaScript SPA. Covers project...
canonical: https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: TodoMVC with Spring Boot and Thymeleaf (Part 1) | daily.dev
og:description: A step-by-step tutorial building a TodoMVC application using Spring Boot and Thymeleaf for server-side rendering instead of a JavaScript SPA. Covers project...
og:url: https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj
og:image: https://api.daily.dev/og/posts/OZlgNRBvJ.png
og:image:alt: TodoMVC with Spring Boot and Thymeleaf (Part 1)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TodoMVC with Spring Boot and Thymeleaf (Part 1)

**[Wim Deblauwe](https://daily.dev/sources/wim-deblauwe)** · 7 min read · 0 upvotes · 0 comments

## Summary

A step-by-step tutorial building a TodoMVC application using Spring Boot and Thymeleaf for server-side rendering instead of a JavaScript SPA. Covers project setup via Spring Initializr with Maven, Java 17, Spring Data JPA, and H2 database. Walks through creating a JPA entity and repository, serving HTML with a controller, integrating CSS/JS via WebJars instead of npm, using Thymeleaf attributes (th:if, th:field, th:action, th:remove) to conditionally render UI, handling form submissions with a form data object and POST mapping, and displaying todo items using Thymeleaf fragments and DTOs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.wimdeblauwe.com/blog/2021/09/20/todomvc-with-spring-boot-and-thymeleaf-part-1/>

## Similar posts on daily.dev

- [Writing a Thymeleaf component library](https://daily.dev/posts/writing-a-thymeleaf-component-library-iotnp1w9y) · Wim Deblauwe · 6 upvotes · 0 comments
- [Spring Boot tutorial: Get started with Spring Boot](https://daily.dev/posts/spring-boot-tutorial-get-started-with-spring-boot-itnz41zwx) · InfoWorld · 1 upvotes · 0 comments
- [You're staying on the list](https://daily.dev/posts/you-re-staying-on-the-list-wy90nvyii) · Wim Deblauwe · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#java](https://daily.dev/tags/java), [#spring](https://daily.dev/tags/spring), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"TodoMVC with Spring Boot and Thymeleaf (Part 1)","url":"https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj"},"datePublished":"2026-03-16T08:14:52.352Z","dateModified":"2026-03-16T08:31:18.816Z","description":"A step-by-step tutorial building a TodoMVC application using Spring Boot and Thymeleaf for server-side rendering instead of a JavaScript SPA. Covers project...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2235a10c87f3d4a35c73c1f4d27ab52d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2235a10c87f3d4a35c73c1f4d27ab52d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Wim Deblauwe","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Wim Deblauwe","logo":"https://media.daily.dev/image/upload/s--g1qrglrf--/c_limit,w_256/f_auto,q_auto/v1773648779/logos/wim-deblauwe?_a=BAMAMiiu0","url":"https://daily.dev/sources/wim-deblauwe"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/todomvc-with-spring-boot-and-thymeleaf-part-1--ozlgnrbvj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,java,spring,spring-boot","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Wim Deblauwe","item":"https://daily.dev/sources/wim-deblauwe"},{"@type":"ListItem","position":3,"name":"TodoMVC with Spring Boot and Thymeleaf (Part 1)"}]}
```

