Created
February 11, 2013 21:17
-
-
Save andrewconner/4757700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Global extends GlobalSettings { | |
private lazy val injector = { | |
Play.isProd match { | |
case true => Guice.createInjector(new ProdModule) | |
case false => Guice.createInjector(new DevModule) | |
} | |
} | |
override def getControllerInstance[A](clazz: Class[A]) = { | |
injector.getInstance(clazz) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment