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…

Show SQL from Spring Data JPA/hibernate in Spring Boot

Let’s learn how to configure spring boot to show SQL statements and parameters generated by Spring data JPA and hibernate via various approaches. Overview If you are using Spring JPA or hibernate for JDBC abstraction, then you may already find it difficult to debug your SQL statements. For this reason, you can configure your application…

Spring Boot RabbitMQ – Complete Guide For Beginners

RabbitMQ is a message broker that receives and forwards messages. In this post, You will learn how to use RabbitMQ with spring boot. Also, you will learn how to publish to and subscribe from queues and exchanges. Setting up RabbitMQ in local machine You can download the RabbitMQ installer from the official download page. However,…

Spring Boot Actuator Info endpoint – Complete Guide

Introduction In this post, we will take a look at the spring boot actuator info endpoint. And also how to customize it to show build info, git commit info and extra info from the environment. Spring Boot Actuator Dependency First, you need to add the dependency for actuator. Once added, you can open the /actuator/info…

Web server failed to start Port 8080 was already in use

In this post, We will try to understand the Web server failed to start Port 8080 was already in use error and how to fix it. Why Port 8080 was already in use? In the network, an IP address identifies each machine. Similarly, The network port identifies the application or process running on a machine. When an…

iText HTML to PDF in Java with Examples

Let’s learn how to convert HTML to pdf using java and the itext pdf library. Itext PDF library lets you convert HTML to PDF documents. In this post, we will take a look at a simple example of HTML to PDF conversion. itext pdf dependencies To add support for itext-pdf dependencies, you need to add…