-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Support for Compile Time DI with Play 2.4 #69
Comments
Hi @loicdescotte, With this pull request, you will be able to manually create a mailer client: val email = Email("Simple email", "Mister FROM <[email protected]>")
new SMTPMailer(SMTPConfiguration("typesafe.org", 1234)).send(email) AFAIK trait MailerComponents {
def configuration: Configuration
lazy val mailerClient = new SMTPMailer(new SMTPConfigurationProvider(configuration).get())
} Having said that, we still need to sort out how to let user provide their own |
@Mogztter great, I hope it will be merged :) |
Resolved by #70 |
Hi,
Play 2.4 supports both runtime and compile time dependency injection.
As CommonsMailer uses
@Inject
it seems impossible to use it without the Guice container.It would be nice to provide a trait that provide a "raw" mailer client and that could be mixed in Play's
BuiltInComponentsFromContext
to support compile time DI, like this WS Component for example.Thanks
Loïc
The text was updated successfully, but these errors were encountered: