t2v / play2-auth

Play2.x Authentication and Authorization module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency injection in play2-auth

ziguane opened this issue · comments

Hi all !
Beginner question...

Play 2.4 natively supports the dependency injection (DI)?
What are the best practices for play2-auth on the use of DI?
Are there examples?

Thanks in advance

Hi,

However there are no best practices of DI :(
We want to provide a way that play2-auth users can select runtime DI or compile-time DI freely.
But Play2 team does not support these system for third party libraries...

In my personal opinion, I recommend compile-time DI if you don't need to control object life cycle.

best,