Emil Genov bio photo

Emil Genov

Software developer living in Barcelona

LinkedIn Github Stackoverflow

So I found this awesome article that lists all combinations of usage of dependency injection provided by Spring and Java CDI.

Personally I preffer use CDI annotations when writing libraries that will be used by other, because:

  • I don’t decide what DI framework will be choosen by end user
  • I don’t get heavy with Spring dependencies
  • I can express DI dependencies in my code enough with usage of Java CDI.