Home  >  Forum  >  Spring
Post New Query

How spring framework works

Asked on March 30, 2014
Hi All, 
I want to know a basic Question that how spring framework works. How it manages beans and perform dependency injection?

Replied on April 02, 2014
Spring Framework is a Java platform that provides comprehensive infrastructure support for developing Java applications. Spring handles the infrastructure so you can focus on your application.

Spring enables you to build applications from “plain old Java objects” (POJOs) and to apply enterprise services non-invasively to POJOs. This capability applies to the Java SE programming model and to full and partial Java EE.
Examples of how you, as an application developer, can use the Spring platform advantage:
  1. Make a Java method execute in a database transaction without having to deal with transaction APIs.
  2. Make a local Java method a remote procedure without having to deal with remote APIs.
  3. Make a local Java method a management operation without having to deal with JMX APIs.
  4. Make a local Java method a message handler without having to deal with JMS APIs.

Replied on April 02, 2014
Spring frameworks works on the basis of dynamic proxy provided by java. Dynamic proxy is an instance whose method is invoked by java.lang.reflect.InvocationHandler. Dynamic proxy is created by java.lang.reflect.Proxy class.

To understand more on Dynamic proxy visit the page

Dynamic Proxy with Proxy and InvocationHandler in Java
Dynamic proxy allows to run any method before or after or around the actual method. This facilitate Spring to integrate AOP for different purpose like transaction.

Write Answer

©2022 concretepage.com | Privacy Policy | Contact Us