Chapter 3. Advanced wiring

This chapter covers

  • Spring profiles
  • Conditional bean declaration
  • Autowiring and ambiguity
  • Bean scoping
  • The Spring Expression Language

In the previous chapter, we looked at some essential bean-wiring techniques. You’re likely to find a lot of use for what you learned in that chapter. But there’s more to bean wiring than what we explored in chapter 2. Spring has several other tricks up its sleeve for more advanced bean wiring.

In this chapter, we’ll dig in to some of these advanced techniques. You won’t get as much day-to-day use out of the techniques in this chapter, but that doesn’t mean they’re any less valuable.

3.1. Environments and profiles

One of the most challenging things about developing software ...

Get Spring in Action, 4th Edition: Covers Spring 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.