Beans are Java objects that are managed by IoC containers. The developer supplies the configuration metadata to the IoC container, which is then used by the container to construct, assemble, and manage the beans. Beans should have a unique identifier inside a container. A bean may have more than one identity using an alias.
You can define beans using XML, Java, and annotations. Let's declare a simple bean using Java-based configuration: