Autowiring By Type — @Primary
Learn how Spring dynamically autowires a dependency in case it finds more than one component of the same type.
We'll cover the following...
Dynamic bean selection
In the last lesson, we saw Spring manage two beans of the RecommenderImplementation
and ContentBasedFilter
classes for us. In this lesson, we will add another bean and see how Spring can dynamically choose a bean if it finds two matches of the same type.
For the code example shown in this lesson, we have created a sub-package called lesson4
inside the package io.datajek.spring.basics.moviere
...