上QQ阅读APP看书,第一时间看更新
Dependency injection types
In the previous example, we used a setter method to wire in the dependency. There are two types of dependency injections that are used frequently:
- The setter injection
- The constructor injection
In the previous example, we used a setter method to wire in the dependency. There are two types of dependency injections that are used frequently: