找不到现有的 Playframework 异步缓存 class

Playframework async cache can't found existing class

在我的基于服务播放框架的应用程序中class,我使用了播放异步缓存。播放缓存内部使用ehcahe。当我尝试从缓存中获取值时,程序流在此步骤中冻结。当我尝试从调试器(Idea Evaluate Expression 工具)执行此代码时

private final AsyncCacheApi cacheApi;
...
cacheApi.getOrElseUpdate("123", () -> CompletableFuture.completedFuture(123));

我收到一个错误

Compilation failed: 
package com.typesafe.config does not exist 
package org.keycloak does not exist

cacheApi 通过 guice 传递到 Servce class。

服务 class 已作为外部依赖项从外部 jar 加载。

为什么播放缓存看不到 classes?如何解决?

不使用 cacheApi 一切正常。

按照以下指令运行正常 https://www.playframework.com/documentation/2.7.x/JavaCache#Setting-the-execution-context

By default, all Caffeine and EhCache operations are blocking, and async implementations will block threads in the default execution context. Usually this is okay if you are using Play’s default configuration, which only stores elements in memory since reads should be relatively fast. However, depending on how cache was configured, this blocking I/O might be too costly. For such a case you can configure a different Akka dispatcher and set it via play.cache.dispatcher so the cache plugin makes use of it:

play.cache.dispatcher = "contexts.blockingCacheDispatcher"

contexts {
  blockingCacheDispatcher {
    fork-join-executor {
      parallelism-factor = 3.0
    }
  }
``