deadbolt-2-scala
deadbolt-2-scala copied to clipboard
Unable to provide custom execution context
On fixing tests i trying to providing custom execution context i found that it's impossible. I made little change in ExecutionContextProvider.scala
case Failure(ex) =>
logger.info("No custom execution context found, falling back to scala.concurrent.ExecutionContext.global")
logger.info("No custom execution context found, falling back to scala.concurrent.ExecutionContext.global", ex)
scala.concurrent.ExecutionContext.global
and gets
[info] - deadbolt.execution-context - No custom execution context found, falling back to scala.concurrent.ExecutionContext.global
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Found a circular dependency involving play.api.Application, and circular dependencies are disabled.
at play.api.DefaultApplication.class(Application.scala:235)
while locating play.api.DefaultApplication
while locating play.api.Application
1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1028)
at be.objectify.deadbolt.scala.DefaultExecutionContextProvider$$anonfun$1.apply(ExecutionContextProvider.scala:42)
Solution would be injecting injector instead application provider. I made fixes but they depends on #36