Taming Thymeleaf
$19.99
Minimum price
$24.99
Suggested price

Taming Thymeleaf

Practical Guide to building a web application with Spring Boot and Thymeleaf

About the Book

Taming Thymeleaf will learn you about writing web applications with Spring Boot and Thymeleaf in no-time. The book teaches you step-by-step how to get started with those technologies and build a fully fledged web application including security, validation, internationalization, testing, ...

About the Author

Wim Deblauwe
Wim Deblauwe

Wim Deblauwe is a software engineer who has been working mainly with Java and Spring for the past 20 years. He has developed and designed various IoT-related projects that have seen deployments worldwide. He also works with JavaScript, Python, PHP, and ActionScript if the project calls for it. 

Since 2016, he is working for Pegus Digital, a Belgium-based remote-first company that focuses on being an innovation partner to other companies for software development. Implementing various challenging projects with Spring Boot and mobile applications at Pegus Digital has really accelerated his learning.

Table of Contents

The currently published book has the first 13 chapters. New chapters will be published weekly.  
  • 1. What are Spring Boot and Thymeleaf?
    • 2.1 Spring Framework
    • 2.2 Spring Boot
    • 2.3 Thymeleaf
  • 2. Getting started
    • 3.1 Prerequisites
    • 3.2 Spring Initializer
    • 3.3 Summary
  • 3. Thymeleaf introduction
    • 4.1 What is Thymeleaf?
    • 4.2 Writing our first template
    • 4.3 Writing our first controller
    • 4.4 Thymeleaf expressions
    • 4.5 Thymeleaf attributes
    • 4.6 Preprocessing
    • 4.7 Summary
  • 4. Thyme Wizards
    • 5.1 Cascading Style Sheets
    • 5.2 Tailwind CSS
    • 5.3 Application shell
    • 5.4 Summary
  • 5. Fragments
    • 6.1 What are fragments?
    • 6.2 Using fragments
    • 6.3 Fragments with parameters
    • 6.4 Fragments with HTML snippets as arguments
    • 6.5 Inline separate SVG files
    • 6.6 Homepage refactoring
    • 6.7 Menu item components
    • 6.8 Summary
  • 6. Layouts
    • 7.1 What is the Thymeleaf Layout Dialect?
    • 7.2 Layouts with parameters
    • 7.3 Page titles
    • 7.4 Homepage refactoring
    • 7.5 Summary
  • 7. Controllers
    • 8.1 What is a controller?
    • 8.2 Exposing data to the view
    • 8.3 Path parameters
    • 8.4 Posting data
    • 8.5 Support for other HTTP methods
    • 8.6 Team and User controllers
    • 8.7 Summary
  • 8. Internationalization
    • 9.1 Internationalization basics
    • 9.2 Using a query parameter to select the language
    • 9.3 Menu items translations
    • 9.4 Summary
  • 9. Database connection
    • 10.1 Spring Data JPA
    • 10.2 PostgreSQL database
    • 10.3 Getting started with Spring Data JPA
    • 10.4 Summary
  • 10. Displaying data
    • 11.1 Generate random users
    • 11.2 Get users on the HTML page
    • 11.3 Refactor the table using fragments
    • 11.4 Use pagination
    • 11.5 Hide columns on mobile
    • 11.6 Summary
  • 11. Forms
    • 12.1 Form fields
    • 12.2 Error messages
    • 12.3 Custom error messages
    • 12.4 Custom validator
    • 12.5 Errors summary
    • 12.6 Validation groups and order
    • 12.7 Summary
  • 12. Data editing
    • 13.1 Add user button
    • 13.2 Edit user data
    • 13.3 Refactoring to fragments
    • 13.4 Handling Optimistic Locking failure
    • 13.5 Custom error pages
    • 13.6 Summary
  • 13. Delete
    • 14.1 Using a dedicated URL
    • 14.2 Using the DELETE HTTP method
    • 14.3 Flash attributes
    • 14.4 Summary
  • 14. Security
    • 15.1 Default Spring Security
    • 15.2 Hardcoded password
    • 15.3 User roles
    • 15.4 Thymeleaf integration
    • 15.5 Custom logon page
    • 15.6 Users from database
    • 15.7 Summary
  • 15. Testing
    • 16.1 Using @WebMvcTest
    • 16.2 Using Cypress
    • 16.3 Summary
  • 16. Various tips and tricks
    • 17.1 Open Session In View
    • 17.2 StringTrimmerEditor
    • 17.3 Global model attributes
    • 17.4 File upload
    • 17.5 Selecting a linked entity value
    • 17.6 Dynamically adding rows
    • 17.7 Custom editors and formatters
    • 17.8 Date picker

Authors have earned$9,539,843writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub