Spring Framework

Spring Projects

Spring Project 1

Terminology of Spring Framework
Previous Home Next

Bean definition object represented by the XmlBeanFactory (DefaultListableBeanFactory). the bean manage object creation ,dependency satisfaction through the IOC container which contain following details:

The <bean> element is used to specify the configuration of a bean to IOC container. the syntax of <bean> element.

<bean id="UniqueIdentifier" name="alias" class="BeanClass" scope="singleton/prototype" factory-method="Name of factory method" factory-bean="Name of factory bean">

Bean Tag Element

There are many types of bean tag element in the spring framework which are following:

  1. id and name: The bean identify in which type of bean class are requested by the user.
  2. class: The bean class provide the information of requested by user.
  3. singleton and prototype: The bean create object one time in the case of singleton and bean create object requirement of user it means more then one time in the case of proto type.
  4. constructor argument: This configuration provide value in constructor of the bean class if which are defined in bean class. This configuration used in constructor injection.
  5. property bean: This configuration set the value in setter method which are define in the bean class. This configuration used in setter injection.
Identify Bean by IOC container

IOC container usage id, name and class attribute is same sequence to identify a bean.

  • Resource: Resource is an interface provided by the framework it contain method for managing configuration information. The configuration information represent information required by IOC container for creating, dependency satisfaction and lifecycle management of bean.
  • BeanFactory: BeanFactory is an interface provided by spring framework. This interface represent the functionality of basic IOC container Implementation of it is provided by the framework.
Previous Home Next