How to inject the (application: Application) when the application starts with play framework 2.5?
问题 I'am trying to inject the application value when starting the play server in order to display something if the app in prod mode and something else if it is in dev mode, I created the module file that will inject eagerly the class: class startModule extends AbstractModule { @Override() override def configure(): Unit = { bind(classOf[StartApplication]).asEagerSingleton() } also I added in the conf file, and my start application code is : @Singleton class StartApplication @Inject() (lifecycle: