Spring Basics

Spring Framework

Spring @Lookup Method Injection

Spring lookup method injection is the container’s ability to override methods on container-managed beans and return another container-managed bean.

Spring: Injecting Prototype Bean into Singleton Bean

Spring context supports singleton and prototype bean scopes along with four other scopes specific to the web context. The singleton is the default bean scope. A common problem arises when we want to inject a prototype-scoped bean into a singleton-scoped bean. In this case, as the singleton bean is initialized …

Spring Tutorials

Spring helps write high-performing, easily testable, and reusable code and promotes programming best practices by applying dependency injection (DI).

Spring Boot Filter: with Order and URL Pattern Examples

In this Spring boot tutorial, we will learn to create, order and register servlet filters in different ways including Filter interface, @WebFilter annotation and inbuilt filter bean classes. 1. Introduction In a web application, we must implement the javax.servlet.Filter interface (jakarta.servlet.Filter in Spring Boot 3) to create filters that can …

Spring Boot Profiles

Learn about Spring profiles, @Profile, profile-specific beans and properties, profile groups and activating a certain profile during startup.

Spring @Lazy Loaded Beans

Spring @Lazy allows lazy bean creation either to specific beans or we can configure the lazy loading globally at the application level.

Spring BeanPostProcessor Example

Spring BeanPostProcessor allows for custom modification of new bean instances created by spring bean factory. Spring AOP classes use bean post-processors

Spring static factory-method example

In Spring framework, if you want to create a bean by invoking a static factory-method, whose purpose is to encapsulate the object-creation process in a static method then you could use factory-method attribute. Read More : Spring FactoryBean Static factory method example If you want to create different EmployeeDTO objects …

Spring FactoryBean with Example

In Spring, FactoryBean creates beans that cannot be created using the ‘new’ keyword and involve complex initialization or configuration.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.