Mr.Humorous 🥘

Nothing is impossible, the word itself says 'I'm possible'❗️ 💪

Flyweight Design Pattern in Java

Understanding Flyweight Design Pattern

1. Overview The flyweight design pattern’s intent is: Use sharing to support large numbers of fine-grained objects efficiently Flyweight design pattern is a Structural design pattern like Faca...

Resource vs. Inject vs. Autowired

Understanding annotation wiring in Spring

1. Overview Annotations used to perform dependency injection: javax.annotation.Resource javax.inject.Inject org.springframework.beans.factory.annotation.Autowired 2. The @Resource Annotati...

Understanding Object Ordering in Java with Comparable and Comparator

What is Comparable and Comparator

1. Overview To understand how sorting actually works with elements in collections and arrays, let’s see some examples where we use the utility class Collections to sort elements of a collection (or...

Understanding SSL Certificate

What is SSL certificate and how does it work

1. What is an SSL Certificate and How Does it Work? SSL certificates create an encrypted and secure connection and establish trust. To ensure visitors their connection is secure, browsers provide ...

Injecting Prototype Bean into a Singleton Instance in Spring

How to inject prototype bean into singleton bean

1. Overview By default, Spring beans are singletons. The problem arises when we try to wire beans of different scopes. For example, a prototype bean into a singleton. This is known as the scoped b...

Spring Bean Scopes

Quick Guide to Spring Bean Scopes

1. Overview The scope of a bean defines the life cycle and visibility of that bean in the contexts in which it is used. The latest version of Spring framework defines 6 types of scopes: single...

Introduction to Java ArrayDeque

Understanding Java ArrayDeque data structure

1. Overview An ArrayDeque (also known as an “Array Double Ended Queue”, pronounced as “ArrayDeck”) is a special kind of a growable array that allows us to add or remove an element from both sides....

Spring MVC and the @ModelAttribute Annotation

How to use the @ModelAttribute Annotation

1. Overview One of the most important Spring-MVC annotations is the @ModelAttribute annotation. The @ModelAttribute is an annotation that binds a method parameter or method return value to a name...

The Twelve Factors App

Understanding the 12 factors to build better web apps

1. Codebase One codebase tracked in revision control, many deploys A twelve-factor app is always tracked in a version control system, such as Git, Mercurial, or Subversion. A copy of the re...

What if Spring Boot Handled Forms Like JSON?

Makes Spring Boot handles forms like json

What follows is an unexpected journey to some of the inner workings of Spring Boot. In particular, how it handles materializing POJOs from an incoming HTTP request. It all started with an innocent ...