IoC容器和Dependency Injection模式
2018-05-14 本文已影响0人
杨传池chris
依赖注入的形式主要有三种,我分别将它们叫做
(1)构造函数注入(ConstructorInjection);
(2)设值方法注入(SetterInjection);
(3)接口注入(Interface Injection)。
依赖注入的形式主要有三种,我分别将它们叫做
(1)构造函数注入(ConstructorInjection);
(2)设值方法注入(SetterInjection);
(3)接口注入(Interface Injection)。