@Qualifier in SpringBoot

  • Qualifier annotation can be used with @Component and @Bean annotated class.
  • @Qualifier means, which bean is qualify to autowired on a field
  • Qualifier annotation can be used with Object reference.
  • This annotation can also be applied on constructor arguments or method parameters.
  • @Qualifier are basically search by name where @Autowired is search by type.
  • Custom Qualifier exist, where we can decided the selection of object of a class in a customized way

Leave a Comment