Building Microservices with Spring
上QQ阅读APP看书,第一时间看更新

Injecting Spring beans

Spring provides these two ways to define the DI pattern to inject the dependency with the dependent bean in an application:

  • Using constructor injection
  • Using setter injection