The main reason arises from the generics definition in Java, therefore WalletService<TradeWallet> not a subclass of WalletService<Wallet>, , therefore Spring cannot match beans. Based on solutions, limited wildcards can be used:
private List<WalletService<? extends Wallet>> walletServices;
There is also an alternative that is error prone and has side effects. If you annotate your WalletService so that Spring creates a proxy object for it, both WalletService<TradeWallet> and WalletService<PersonalWallet> will be wrapped in proxy objects, and for the outside world they look like WalletService without any information about the generics, This causes problems as soon as you want to introduce, say, WalletService<TradeWallet> and Spring will fail, because both proxy objects match this bean definition.
source share