目前,我正在使用application.conf
文件来创建远程actor系统。我的代码就像:
public static void main(String args[]) {
ActorSystem system = ActorSystem.create("RemoteActor1", ConfigFactory.load().getConfig("RemoteActor1"));
ActorRef actor = system.actorOf(Props.create(ActorSlave1.class), "RemoteActorProcessor1");
}
我的application.conf文件是
RemoteActor1{
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
netty.tcp {
hostname = "IN1WXL-300897"
port=2561
}
}
}
}
我不想在我的代码中包含此application.conf
文件。如何从代码中获取它并配置远程actor系统?