FreeMarker vs Groovy vs Mustache vs Thymeleaf

In this post, we will try to compare FreeMarker vs Groovy vs Mustache vs Thymeleaf with examples. Spring Boot supports FreeMarker, Groovy, Mustache and Thymeleaf. But, how do they compare with each other? Let’s find out which template engine is the best for different use-cases in spring boot. For this comparison, I have created four…

Spring Boot Custom Health Indicators

In this post, We will learn about writing Custom Health Check indicators for Spring Boot Applications. Spring Boot out-of-the-box health checks are good. But in the real world, it is often the case that one application relies on another application’s availability for performing operations. In this case, it would be helpful to add a health…

Spring IOC Container

Traditionally, the flow of business logic depends on the statically defined objects and their dependents. This approach creates tightly coupled applications that are hard to extend or modify. But with IOC containers, the business logic depends on the object graph built by an IOC container. So what is an IOC Container? Inversion Of Control(IoC) is…

Using JdbcTemplate with Spring Boot

Introduction Spring Boot provides support to typical JDBC operations via jdbcTemplate. With JDBC templates, you can perform complex database operations which are not possible through JPA. Starter Dependencies JDBC templates feature is part of the Spring JDBC module. This means that either the JPA starter or the JDBC starter will bring this support. As we…

Derby Embedded Database for Spring Boot

In this post, We will see how we can use Apache Derby embedded database with Spring Boot applications with an example. Introduction Apache Derby is a pure java implementation of a relational database. Also, it complies with JDBC and RDBMS standards. For this reason, we can easily embed Derby into applications. Derby Dependencies for Spring…

Spring Boot H2 Database

Introduction Let’s learn how to use the h2 database with the spring boot application and its configuration via application properties. H2 is an in-memory database that we can embed within the application. For this reason, H2 is the right candidate for loading test data or to prototype an application. Spring Boot Dependencies Spring Boot doesn’t…

Drools Rule Engine for Spring Boot – Tutorial

Lets learn how to integrate Drools Rule Engine with Spring Boot application for business rules management with an Example. Drools is a Business Rule Engine that is based on Java Rules API. It lets you create complex applications where the business logic changes a lot post development. Introduction To Drools For example, you may run…

Spring @Async to increase performance in 3 steps

Lets learn about Spring Boot @Async annotation and use it to achieve Async (asynchronous) method execution in Spring Boot. Introduction to @Async annotation Normally, A program would run from top to bottom. But sometimes, one operation or method may take time and it would cause other methods to wait. In these cases, it makes sense…

Enums in Thymeleaf templates

In this post, We will take a look at how we can use enums in thymeleaf with examples. Select tag in HTML is usually a form input with a set of pre-defined options. Even though it is common to hard code these values, thymeleaf can offer you much more leverage with Enum support. Let’s see how we can…

Boolean in Thymeleaf for Conditional Evaluation

Thymeleaf relies a lot on boolean conditionals to render the HTML views. In this post, we will see how thymeleaf handles boolean values using th:if and th:unless directives. Boolean expressions in Thymeleaf In Thymeleaf, all expressions can act as a Boolean expression. For example, The following values are considered false. An expression or a literal…