我们在使用时遇到了一堆问题play-slick
,所以我已经恢复到直接的 Slick 3.1.1 实现。
这解决了我们在并发方面的各种问题,但是......现在我正在尝试添加进化,但它似乎不起作用。我已将以下内容添加到build.sbt
:
libraryDependencies ++= Seq(
"com.typesafe.slick" %% "slick" % "3.1.1",
"com.typesafe.play" %% "play-slick-evolutions" % "1.1.1", ...
而且,当我这样做时,我注意到“play-slick-evolutions”并想,“哦,不,我打赌那些只有 with play-slick
。” 似乎是这样,因为进化没有开火。
当我尝试打开它们时,出现以下异常:
[error] ! work from within a browser
[error] com.google.inject.CreationException: Unable to create injector, see the following errors:
[error]
[error] 1) No implementation for play.api.db.DBApi was bound.
[error] while locating play.api.db.DBApi
[error] for parameter 3 at play.api.db.evolutions.ApplicationEvolutionsProvider.<init>(EvolutionsModule.scala:45)
[error] at play.api.db.evolutions.EvolutionsModule.bindings(EvolutionsModule.scala:22):
[error] Binding(class play.api.db.evolutions.ApplicationEvolutions to ProviderConstructionTarget(class play.api.db.evolutions.ApplicationEvolutionsProvider) eagerly) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[error]
[error] 2) No implementation for play.api.db.DBApi was bound.
[error] while locating play.api.db.DBApi
[error] for parameter 0 at play.api.db.evolutions.DefaultEvolutionsApi.<init>(EvolutionsApi.scala:71)
[error] at play.api.db.evolutions.EvolutionsModule.bindings(EvolutionsModule.scala:21):
[error] Binding(interface play.api.db.evolutions.EvolutionsApi to ConstructionTarget(class play.api.db.evolutions.DefaultEvolutionsApi)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[error]
[error] 2 errors (Errors.java:466)
[error] com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
[error] com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
[error] com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
[error] com.google.inject.Guice.createInjector(Guice.java:96)
[error] com.google.inject.Guice.createInjector(Guice.java:73)
[error] com.google.inject.Guice.createInjector(Guice.java:62)
[error] play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
[error] play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
[error] play.api.test.FakeApplication.<init>(Fakes.scala:216)
[error] play.api.test.WithBrowser$.$lessinit$greater$default$2(Specs.scala:74)
[error] application.TestBrowserResponses$$anonfun$1$$anonfun$apply$1$$anon$1.<init>(TestBrowserResponses.scala:8)
[error] application.TestBrowserResponses$$anonfun$1$$anonfun$apply$1.apply(TestBrowserResponses.scala:8)
[error] application.TestBrowserResponses$$anonfun$1$$anonfun$apply$1.apply(TestBrowserResponses.scala:8)
任何人都知道是否可以仅使用普通 Slick 使用进化?