Handling Lists in Thymeleaf view

Post Header

In this article, We will see how to handle Lists in thymeleaf templates with an example using th:each attribute. Loop through a Lists Let’s create a list of Objects first and then supply it to the Model and View. For this reason, We created a UserInfo object. The list we are going to use in our thymeleaf model is … View This post

Boolean in Thymeleaf for Conditional Evaluation

Post Header

Thymeleaf relies a lot on boolean conditionals to render the HTML views. In this post, we will see how thymeleaf handles boolean values. Boolean expressions in Thymeleaf Everything can be evaluated into boolean in thymeleaf. To categorize, The following values are considered false. An expression or a literal that is false. A String literal that equals … View This post

Thymeleaf Expressions in Spring Boot

Post Header

Thymeleaf let us create dynamic views via extensive use of expressions in the template files. The simple form of expressions fall into four main categories. Variable expressions Variable expressions are the most commonly used ones in thymeleaf templates. These expressions help bind the data from the template context(model) into the resulting html(view). For example, The … View This post

Thymeleaf CRUD web Application with Example

Post Header

In this post, We will try to create a Simple Thymeleaf CRUD web application using Spring Boot. A CRUD application lets you Create, Read, Update and Delete things like files, database entries etc. With the help of JPA repositories and their built-in methods, it’s easy implement this. In this guide, we’ll learn how to build a CRUD web application with … View This post

Spring Boot Hazelcast Cache

This is a complete guide for using Hazelcast as cache backend in your spring boot application. What is Hazelcast? Hazelcast (Hazelcast-IMDG) is an in-memory data grid. It helps create a data structure which is attached/replicated between multiple application instances. This approach gives the advantages of avoiding network round trips. The ideal use-case for Hazelcast-IMDG would be store … View This post

Spring sessions in a Separate Database

Storing session details in Redis or database is usually a good idea. However, the default implementation of spring-session-jdbc uses the primary data source to store and retrieve data from the session related tables. This can be a problem when there is a large amount of session related operations to the database. To avoid these situations, it is a good … View This post