Why Spring Exists

Why Spring hands you your dependencies instead of you building them yourself.

  • 5 cards
  • 4 questions
  • About 5 min
  • Difficulty
Share

A class that builds its own dependencies works fine until you need to swap one out — a test, a different provider, a mock that doesn't touch the network. This topic is about the one habit that makes swapping possible at all: never say new for something you depend on. It ends with a name for the thing that does the swapping on your behalf, which the next topic opens with.

Contents

5 cardsnot started