Spring Boot with Thymeleaf tutorial, part 3 – Spring Data JPA

In this tutorial I am going to add a possibility of storing added posts in a database. I extend previous project where post form is already implemented. I use H2 in-memory database to simplify project’s complexity. To implement data access layer in the application I use Spring Data JPA.

1. Set up the project as is described in previous post or checkout the source code.

2. Add Maven dependencies to enable Spring Data JPA and H2 database:

Read more

Spring Boot with Thymeleaf tutorial, part 2 – Forms with validation

In this tutorial I am going to extend previous project and show you how to handle with Forms in Spring Boot and Thymeleaf. I am going to create simple form for post. If post is valid, it will be displayed on the result view.

1. Set up the project as is described in previous post or checkout the source code.

2. pom.xml file is the same like in the previous project. I have only changed name and description.

Read more