Spring Boot Latest Version | Updates and New Features

As of May 13th of 2021, The latest stable spring boot version is 2.4.5. Spring Boot 2.4.5 offers a lot of new features and dependency updates. Let’s check them out in detail. Spring Boot 2.4.5 requires at least Java version 8. It is also compatible with java 11 and 15. Understanding Spring Boot release cycle…

SpringApplication Class in spring Boot

In this post, We will take a look at SpringApplication class, What its purpose and How to use SpringApplication class in Spring Boot. Introduction to SpringApplication class You may have seen this class already. When generating a Spring Boot project from Spring Initializer or from IDE, You could see this class in the main method….

Failure Analyzers in Spring Boot and How they Work

In this post, We will take a look at how Failure Analyzers in Spring Boot work and how to implement them to handle startup failures in spring boot. Introduction to Failure analyzers Failure Analyzers is a diagnostics feature from Spring Boot to deal with startup failures. If your application fails to start, These FailureAnalyzers would try…

Understanding Lazy Initialization in Spring Boot

Starting with Spring Boot 2.2, spring beans can be lazy. That is, You could create beans as and when required. Let’s see how to implement lazy initialization with Spring Boot. What is lazy initialization? By default, Spring Framework creates and injects beans and it’s dependencies at the time of context creation or refresh. But with…

Changing Default Port Number in Spring Boot

The developers love spring Boot because it’s out of the box defaults. But sometimes, the developers may need to change these default values. Out of these, The most common one is to change the default port number of embedded web servers in spring boot. So let’s check out the various ways to override the default…

10 Reasons Why You should use Spring Boot.

Spring Boot has earned its place in the Java community for various reason. In this post, We will take a look at 10 Reasons Why You should use Spring Boot. 1) Faster Development Spring Boot makes a lot of decisions and opinionated defaults over Spring Ecosystem. This nature helps the developer to set up and…

Setter Dependency Injection in Spring Framework

Introduction Setter based dependency injection is one of the ways spring allows to do DI. As setters let us update object properties after its creation, This behaviour is a perfect candidate to add optional dependencies in a Spring IoC container. Also, Setter injection plays as an alternative when Constructor Dependency Injection is not possible. For…

Constructor dependency injection in Spring Framework

Spring framework provides inversion of control through Constructor based and Setter based Dependency Injection(DI). In this article, we will explore more about the first kind. What is Constructor based DI in Spring To simply put, When we pass the required objects as constructor arguments at the time of bean creation, then we call it the…

Send HTML emails with FreeMarker Templates – Spring Boot

Let’s learn how to send HTML emails from Spring Boot using FreeMarker template engine. Background Apache FreeMarker is a template engine that helps to create dynamic HTML content. This ability makes it suitable for generating emails based on HTML templates. To demonstrate this, We are going to create an email service using Freemarker and Spring…

Introduction to FreeMarker Templates with Spring Boot

FreeMarker is a java based template engine which has rich support in Spring Boot. In this tutorial, we will learn how to use Apache FreeMarker as a template engine for Spring MVC with an example. Introduction Spring Boot provides out of the box support to four major template engines. Out of these four, FreeMarker has…