Spring MVC

What is a bean ?

Spring IoC container uses a configuration metadata (which is provided in the form of an xml file or using annotations) to instantiate objects, which are used by our java application. These objects are called bean.

configuration metadata contains following properties and their value:

  • class : which java class to use to instantiate object

  • name: unique id/name that will be used to request this bean

  • scope, constructor-arg, properties, autowiring mode, lazy-initialization mode, initialization method, destruction method etc.

Last updated