Learn how to build a simple Spring application to demonstrate how to display various types of errors in Thymeleaf.
In this tutorial, we’ll see how to display error messages originating from a Spring based back-end application in Thymeleaf templates.
For our demonstration purposes, we’ll create a simple Spring Boot User Registration app and validate the individual input fields. Additionally, we’ll see an example of how to handle global level errors.
First, we’ll quickly set up the back-end app and then come to the UI part.
To create a simple Spring Boot app for User Registration, we’ll need a controller, a repository, and an entity.
However, even before that we should add the Maven dependencies.
#spring #thymeleaf #java