Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

CHAPTER 4: Introducing IoC and DI in Spring

C H A P T E R  4

Introducing IoC and DI in Spring

In Chapter 1, we covered the basic principles of Inversion of Control (IoC) and Dependency Injection (DI). Practically, DI is a specialized form of IoC, although you will often find that the two terms are used interchangeably. In this chapter, we take a much more detailed look at IoC and DI, formalizing the relationship between the two concepts and looking in great detail at how Spring fits into the picture.

After defining both and looking at Spring’s relationship with them, we will explore the concepts that are essential to Spring’s implementation of DI. This chapter covers only the basics of Spring’s DI implementation; we discuss more advanced DI features in Chapter 5 and look at DI in the context of application design in both Chapters 5 and 12. More specifically, this chapter will cover the following topics:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial