Tag: Spring Dependency Injection

Spring

Spring Dependency Injection

Introduction: In a well-designed Java application, the classes should be as independent as possible. Such a design promotes reusability of components. It also makes it easier to unit test the various components. The concept of dependency injection promotes loose coupling among Java objects. In this tutorial, we’ll talk about the dependency injection in Spring framework. […]

Be the First to comment. Read More
Spring

Spring : Injecting Prototype Beans Into Singleton Instance

Introduction: In the Spring framework when we inject a prototype bean into a singleton bean, it still behaves as a singleton. It’s known as prototype-bean injection problem. In this tutorial, we’ll learn ways in which we can inject a prototype instance into a singleton bean in Spring. It’s a scenario we’re most likely to encounter […]

One comment Read More