Discussions

Ask a Question
Back to All

Need to inject a DAO-class to my ResourceHandler

In Play 2.4 I used the following code in my isAllowed method:

UnitDAO unitDAO = play.Play.application().injector().instanceOf(UnitDAO.class);

is it possible to inject a class in a similiar way now when that way is removed by the Play team. Since I can't inject it with the usual way since it's a static context.