scala - Where is GuiceApplicationBuilder? -


i trying set play2 application dependency injection, information the official docs. however, ide cannot find guiceapplicationbuilder. additional entry librarydependencies have specify builder?

edit: made screenshot of happens when try import things stated @anquegi

nonexisting dependencies

edit 2: problem simple: used wrong version of play - 2.3.8 did in fact not have these, had use 2.4.0-rc2 work.

at dependencies in play docs /scaladependencyinjection must import this

import play.api.applicationloader import play.api.configuration import play.api.inject._ import play.api.inject.guice._ 

this compile code in section advanced: extending guiceapplicationloader, need use extending in class:

import play.api.applicationloader import play.api.configuration import play.api.inject._ import play.api.inject.guice._  class customapplicationloader extends guiceapplicationloader() {   override def builder(context: applicationloader.context): guiceapplicationbuilder = {     val = configuration("a" -> 1)     initialbuilder       .in(context.environment)       .loadconfig(extra ++ context.initialconfiguration)       .overrides(overrides(context): _*)   } } 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -