我已经在src/main/resources中创建了一个名为application.conf的文件,内容如下:
我已经尝试了这两种方法,但都没有成功。有什么想法吗?
balancing-dispatcher {
type = BalancingDispatcher
executor = "thread-pool-executor"
}
文件里面没有别的内容。
通过使用Akka TestKit创建尝试使用dispatcher的新Actor时,我收到了以下错误信息:
[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.
我已经尝试了这两种方法,但都没有成功。有什么想法吗?