Last active
September 4, 2015 11:19
-
-
Save iref/d7493f9b8b390efaa26e to your computer and use it in GitHub Desktop.
Running evolutions with Compile-time DI
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
trait ApplicationComponent extends BuiltInComponents with SlickComponents | |
with I18nComponents with EvolutionsComponents with SlickEvolutionsComponents { | |
lazy val dbConfigProvider: DatabaseConfigProvider = new DatabaseConfigProvider { | |
override def get[P <: BasicProfile]: DatabaseConfig[P] = api.dbConfig(DbName("default")) | |
} | |
lazy val router: Router = wire[Routes] withPrefix "/" | |
lazy val assets: Assets = wire[Assets] | |
lazy val webJarAssets: WebJarAssets = wire[WebJarAssets] | |
lazy val dynamicEvolutions: DynamicEvolutions = new DynamicEvolutions | |
def onStart() = { | |
applicationEvolutions | |
} | |
onStart() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment