Preface
The Spring Framework is a very powerful framework and provides first class support for dependency injection (DI). This article is the second one in my series dedicated to dependency injection with Spring Framework. My series is split into these three articles:
- Basic usage of DI
- DI with assignability (this article)
- DI with generics
In This Article, You Will Learn:
- How to inject beans by a common interface
- How to inject beans by ancestor (usually abstract) class
- How to inject beans by annotation
Overview
In my previous article, I reviewed the DI basics: different configuration types, injection variants, injection rules, or injected types. Most of it is well known and that article serves just as a summary.