I have classes, xml configuration file and error stack trace like this. I have no idea why @Qualifier doesn\'t work. I see on errors that he don\'t even do anything.
@Qualifier is used to reference a bean by its name or id. Since it can't find an xml entry that has a name or id of 'small' it tries to match by type, of which it found two instances of Size.
The following would work:
Though it appears you would like to treat instances of Size as pre-configured beans. If that were the case you could declare instances of Dog in your xml file and refer to Size beans ... something like this: