chamindu / chamindu-website

0 stars 0 forks source link

posts/spring-di-good-bad-ugly/ #2

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

Spring DI - The Good, the Bad and the Ugly • chamindu.dev

Spring is a mature applications development framework for Java. Combined with the power of Spring Boot it is a competitive choice for modern micro-services based application development. Dependency injection is one of the core services provided by the framework. Spring supports constructor injection and setter injection. Lets take simple example of a hypothetical OrderService class depending on an OrderRepository implementation and discuss the different options available to us. The Good - Constructor Injection In constructor injection as the name implies we pass dependencies via the constructor.

https://www.chamindu.dev/posts/spring-di-good-bad-ugly/

sanapiit commented 5 years ago

Great article... Great start...