Introducing the Spring IoC container
The modern Spring Framework is an extensive suite of framework "stacks" based on architectural concepts that go back to the start of the century. The Spring Framework first came to prominence with Expert One-on-One J2EE Design and Development, Rod Johnson, in 2002. Spring's implementation of the Inversion of Control (IoC) principle, sometimes also known as Dependency Injection (DI), was a breakthrough in enterprise application design and development. The Spring IoC container provided a simple way of configuring objects (JavaBeans) and injecting dependencies through constructor arguments, factory methods, object properties, or setter methods. We have already seen the @PersistenceContext
annotation in our DAO layer that is used by Spring to identify whether an EntityManager
object should be injected into the GenericDaoImpl
class. The sophisticated configuration options available make the Spring Framework a very flexible foundation for enterprise development...