Spring Bean overview

The bean is just as object which is define in the xml file. The beans are managed by the IoC container with the configuration metadata. We use the tag <bean> to define object with metadata. The metadata of bean are-
  •     class- It denotes the instance that means package-qualified class name.
  •     name- This show the name of the bean.
  •     scope- Scope of bean.
  •    constructor-agruments.
  •    properties.
  •    autowiring.
  •    lazy-initialization.
  •    initialization method
  •    destruction method

We will explain each metadata of bean in details in next post.
So we can see the xml configuration of a bean as

<bean id="bean-name" class="package.SpecificClassname">

<property …/>



Post a Comment