@Qualifier is an annotation used to specify which Spring managed bean should be injected via @Autowired. If you were to run the example without @Qualifier, the following exception would be thrown... This error says it all.Jun 3, 2564 BE
xxxxxxxxxx
@Autowired
@Qualifier("Pig")
Animal animal;