Spring的依赖注入方式有三种:
构造器注入(Constructor Injection):通过在类的构造器中注入依赖对象来实现依赖注入。
Setter方法注入(Setter Injection):通过设置类的属性的setter方法来注入依赖对象。
接口注入(Interface Injection):通过接口的方法来注入依赖对象。这种方式在Spring中已经不推荐使用。