Bean management in Spring container

When any software application is being executed, a set of objects are created and interact with each other to achieve specific business goals. Being a POJO-based programming model, the Spring framework treats all the objects of classes in your application as POJO or beans (in a Spring-friendly way). 

These objects or beans should be independent in a manner that they can be re-used or changed without causing the ripple effect of changing others. Being loosely coupled this way, it also provides the benefit of doing testing without much worry of any dependency.

Spring provides an IoC container, which is used to automate the process of supplying external dependency to your class. You need to give instruction (in the form of configuration) about your client and dependencies. Spring will manage and resolve all your dependencies at runtime. Moreover, Spring provides a facility to keep availability of your dependencies at various application scopes, such as request, session, application, and so on.

It's essential to understand how Spring manages the life cycle (the process of creating, managing, and destroying) of objects before getting an idea about injecting dependency. In Spring, all these responsibilities are performed by the Spring IoC container.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.106.233