I have issues to understand how to apply the new feature of Dependency Injection in Play 2.4. I'm familiar with Guice and miss in the Play Documentation an explanation how and when the actual binding is happening. I read the official docu [1] and tried to use the latest Play Mailer [2] as an example. The Play Mailer example uses an arbitrary class and annotates the MailerClient property with @inject. When I try to use an object of this class the property is null, at least while debugging. So, where and when do I have to do the actual injection? I have the same issue for the @singleton annotation. It is just explained how to annotate it, but not how to get an object. Do I have to use Guice directly, or is it integrated some how?
[1] https://www.playframework.com/documentation/2.4.x/JavaDependencyInjection
MyComponentin another class and call thesendMail()method. - linsenfips