I am trying to autowire some beans (for dependency injection) using Spring for a webapp. One controller bean contains another bean which in turn holds a hashmap of another
For me it was case of having two beans implementing the same interface. One was a fake ban for the sake of unit test which was conflicting with original bean. If we use
@component("suggestionServicefake")
, it still references with suggestionService. So I removed @component and only used
@Qualifier("suggestionServicefake")
which solved the problem