Dependency Injection with Spring

So far, we have learned why modularity is so important in writing cleaner and maintainable code. In Chapter 1Why Dependency Injection?, we learned about the Dependency Inversion Principle (DIP), IoC (a design methodology to implement DIP), and various design patterns to implement IoC. Dependency Injection (DI) is one of the design patterns to achieve IoC.

In the Chapter 2, Dependency Injection in Java 9, we learned how modular framework and DI are facilitated in Java 9. In this chapter, we will continue our journey to learn DI in Spring—one of the most popular and widely used frameworks to implement enterprise applications.

In this chapter, we will explore the following topics:

  • A brief introduction to Spring framework
  • Bean management in Spring
  • How to achieve DI with Spring
  • Auto wiring: he feature of resolving dependency automatically
  • Annotation-based DI implementation
  • DI implementation with Java-based configuration
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.168.214