Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
For Spring, all objects are beans! The fundamental step in the Spring Framework is to define your objects as beans. Beans are nothing but object instances that would be created and manage by the Spring Framework by looking at their class definitions. These definitions basically form the configuration metadata. The framework then creates a plan for which objects need to be instantiated, which dependencies need to be set and injected, and the scope of the newly created instance, etc., is based on this configuration metadata.
The metadata can be supplied in a simple XML file, as we saw in Chapter 1. Alternatively, one could provide the metadata as annotation or Java Configuration.
We first discover the definitions of the Spring beans by using a config file which is discussed in the next section.