Introduction
Beans are at the core of Spring. They are standard Java objects instantiated and managed by Spring.
Beans are mostly used to:
Configure Spring in some way (database connection parameters, security, and so on)
Avoid hardcoding dependencies using dependency injection, so that our classes remain self-contained and unit testable
In this chapter, you'll learn how to define beans and use them.