Play Framework, bind Akka Typed actor without create Provider

Viewed 127

I am trying to implement Akka Typed from Akka Classic. In newest document Akka Classic and Akka Typed

My actor

public class ConfiguredActor extends AbstractActor {

  private Config configuration;
  // many other inject components

  @Inject
  public ConfiguredActor(Config configuration) {
    this.configuration = configuration;
    // many other inject components
  }

  ...
}

ConfiguredActor have many inject components. In Classic way, I just need bind an actor

bindActor(ConfiguredActor.class, "configured-actor");

and inject components inside ConfiguredActor will be injected by Guice. like this doc said

Guice will do that for us, providing an implementation that not only passes our key parameter, but also locates the Configuration dependency and injects that

But in Typed way. I have to provide that components when bind actor

For the object-oriented style you must write a Provider for your ActorRef and bind it

Is there anyway to bind an actor in Typed way without create Provider. Thanks

I am using Play framework version 2.8.2, Akka typed version 2.6.0

0 Answers
Related