Creating Bean Post Processors
Problem You would like to register your own plug-ins in the Spring IoC container to process the bean instances […]
Read More →Problem You would like to register your own plug-ins in the Spring IoC container to process the bean instances […]
Read More →Problem A well-designed component should not have direct dependencies on its container. However, sometimes it’s necessary for your beans […]
Read More →Problem Many real-world components have to perform certain types of initialization tasks before they are ready to be used. […]
Read More →When you declare a bean in the configuration file, you are actually defining a template for bean creation, not […]
Read More →As an example, let’s create a ProductRanking class with a bestSeller property whose type is Product. package com.shop; public […]
Read More →First, let’s define two product constants in the Product class. package com.shop; public abstract class Product { public static […]
Read More →The basic requirement of a factory bean is to implement the FactoryBean interface. For your convenience, Spring provides an […]
Read More →You can write the following ProductCreator class by using a configurable map to store the predefined products. The createProduct() […]
Read More →You can write the following createProduct() static factory method to create a product from a predefined product ID. According […]
Read More →Suppose you are going to develop a shop application to sell products online. First of all, you create the […]
Read More →