Spring在注入的时候
    
    @Autowired
    @Qualifier(value = "inpatientInfoInInterService")
    private InpatientInfoInInterService inpatientInfoInInterService;
    public void setInpatientInfoInInterService(InpatientInfoInInterService inpatientInfoInInterService) {
        this.inpatientInfoInInterService = inpatientInfoInInterService;
    }

在注入同时,生命的model名称最好和注入的bean名称一致,因为在set方法的时候,程序是按照找set后的名称寻找
当在恰好存在此bean,就会发生bean注入冲突。

 

相关文章:

  • 2021-06-19
  • 2022-12-23
  • 2021-08-21
  • 2021-05-19
  • 2021-11-09
  • 2021-09-22
  • 2021-05-12
猜你喜欢
  • 2021-08-05
  • 2021-11-30
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
相关资源
相似解决方案