Abstract Design Pattern

Let’s take a look at the abstract factory design pattern in java with a real-world example. Abstract factory pattern in java is a creational pattern. It is based on factory pattern but goes one level deep to create the factory of factories. This pattern deals with similar factories by grouping them. In abstract factory pattern,…

Factory Design Pattern

 The factory method design pattern in java deals with creating objects without having to specify what type of objects to create. It is formally known as the factory pattern and it is a type of the Creational Pattern. Let’s check this pattern with an example. This design pattern is useful when the calling method doesn’t…

Design Patterns in Java

In software engineering, Design patterns in java are the solution to write better applications. They are the best practices to solve certain problems in various situations. And These patterns are not algorithms. And they are definitely not a programming paradigm. But, it is just an approach to building concrete programs. In 1994 Erich Gamma, Richard…

Quartz Scheduler – Introduction

Quartz Scheduler is an open-source job scheduling library that can work with any Java application to create simple or complex CRON schedules for executing a vast amount of jobs. The Quartz Scheduler also includes many enterprise-class features, such as support for JTA transactions and clustering. To simply put, If your application has tasks that need…

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…