Skip to content
目录概览

Spring基于xml注入bean的几种方式

  1. Set方法注入;
  2. 构造器注入:
    • 通过index设置参数的位置;
    • 通过type设置参数类型;
  3. 静态工厂注入;
  4. 实例工厂;