【发布时间】:2013-04-13 21:02:19
【问题描述】:
我在 src/main/resources 中创建了一个文件 application.conf,如下所示:
balancing-dispatcher {
type = BalancingDispatcher
executor = "thread-pool-executor"
}
文件中没有其他内容。
在创建尝试使用调度程序的新 Actor(通过我使用 Akka TestKit 的测试套件)时,我收到以下错误消息:
[WARN] [04/13/2013 21:55:28.007] [default-akka.actor.default-dispatcher-2] [Dispatchers] Dispatcher [balancing-dispatcher] not configured, using default-dispatcher
然后我的程序可以正常运行,尽管只使用一个线程。
此外,我打算将我的程序打包到一个库中。 akka 文档说明了这一点:
If you are writing an Akka application, keep you configuration in application.conf at
the root of the class path. If you are writing an Akka-based library, keep its
configuration in reference.conf at the root of the JAR file.
到目前为止,我已经尝试了这两种方法,但都没有奏效。
有什么想法吗?
【问题讨论】: