Skip to main content

Introducing Inversion of Control

  • Chapter
Pro Spring
  • 393 Accesses

Summary

In this chapter, we covered a lot of ground with both the Spring core and IoC in general. We showed you examples of the different types of IoC and presented a discussion of the pros and cons of using each mechanism in your applications. We looked at which IoC mechanisms Spring provides and when and when not to use each within your applications. While exploring IoC, we introduced the Spring BeanFactory, which is the core component for Spring’s IoC capabilities, and more specifically, we focused on the XmlBeanFactory that allows external configuration of Spring using XML.

This chapter also introduced you to the basics of Spring’s IoC feature set including setter injection, constructor injection, auto-wiring, and bean inheritance. In the discussion of configuration, we demonstrated how you can configure your bean properties with a wide variety of different values, including other beans, using the XmlBeanFactory.

This chapter only scratches the surface of Spring and Spring’s IoC container. In the next chapter, we look at some IoC-related features specific to Spring, and we take a more detailed look at other functionality available in the Spring core.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Rob Harrop and Jan Machacek

About this chapter

Cite this chapter

(2005). Introducing Inversion of Control. In: Pro Spring. Apress. https://doi.org/10.1007/978-1-4302-0004-8_4

Download citation

Publish with us

Policies and ethics