Spring annotation related explanation

@Qualifier

  • Purpose: Use this annotation to specify the imported Bean if there are multiple beans
  • Reference link: juejin.cn/post/684490…

@Primary

  • Action: Use this annotation as the default injected Bean when there are multiple beans. It is similar to @qualifier. When using @Autowire, there is no need to use @Qulifier to specify Bean loading.