Spring dependencies considerations

  1. The single responsibility violation. If you see a constructor with many parameters, you know your class has many responsibilities, or “is doing too much”.
  2. Hidden dependencies: classes injected by field injection don’t show up in the API documentation.
  3. Constructor injection makes your classes container agnostic.

--

--

Software developer, entrepreneur, innovator, with 40 years of experience.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christine

Christine

Software developer, entrepreneur, innovator, with 40 years of experience.