0
Play + Scalaアプリケーション(2.5x)でDeadboltを使用しようとしています。私はすぐに、Deadboltが有効になっているときにエラーが発生する
enabled += "be.objectify.deadbolt.scala.DeadboltModule"
"SBTの実行" した後、私は、サーバーにアクセスしたとき:
libraryDependencies += "be.objectify" %% "deadbolt-scala" % "2.5.1"
そして、私のconf/application.confで:私は(プレイ2.5倍)私のbuild.sbtに次の追加しましたこのエラーが発生する:
play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors:
1) No implementation for be.objectify.deadbolt.scala.cache.HandlerCache was bound.
while locating be.objectify.deadbolt.scala.cache.HandlerCache
for parameter 1 at be.objectify.deadbolt.scala.ActionBuilders.<init>(ActionBuilders.scala:30)
at be.objectify.deadbolt.scala.DeadboltModule.bindings(DeadboltModule.scala:32):
Binding(class be.objectify.deadbolt.scala.ActionBuilders to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
2) No implementation for be.objectify.deadbolt.scala.cache.HandlerCache was bound.
while locating be.objectify.deadbolt.scala.cache.HandlerCache
for parameter 1 at be.objectify.deadbolt.scala.DeadboltActions.<init>(DeadboltActions.scala:34)
at be.objectify.deadbolt.scala.DeadboltModule.bindings(DeadboltModule.scala:30):
Binding(class be.objectify.deadbolt.scala.DeadboltActions to self) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
2 errors]
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:180)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:131)
at scala.Option.map(Option.scala:146)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:131)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:129)
at scala.util.Success.flatMap(Try.scala:231)
私が作った他のコードの変更はありません。 Deadboltを使用するコード行をまだ書いていないのに、なぜそれが失敗するのですか?
おかげで入手可能です。それを追加します。 – NKM
動作する場合:回答としてマークしてください。 –
ありがとうございます。上記のように動作します。 – NKM