There are often use cases where you want to have several different instances for the same interface and decide which collaborator is used from the interface based on the target object.
One idea:
Add "names" or second level descriptions to a component name and have one being registered as default:
There are often use cases where you want to have several different instances for the same interface and decide which collaborator is used from the interface based on the target object.
One idea:
Add "names" or second level descriptions to a component name and have one being registered as default:
Then when calling getComponent you can specifiy an order of annotations and the first one found matches falling back to the default one: