The _____ annotation in Spring Boot is used to designate a specific bean to be autowired when there are multiple candidates.

  • @AutowireBean
  • @Autowired
  • @Primary
  • @Qualifier
In Spring Boot, the "@Primary" annotation is used to designate a specific bean as the primary candidate for autowiring when there are multiple candidates for the same type. This is particularly useful when you have multiple beans of the same type, and you want to specify which one should be injected by default. The other options are related to autowiring but do not serve this specific purpose.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *