Created
November 18, 2016 14:54
-
-
Save fancellu/7eb753b6ad12339bbb1171b0b8744228 to your computer and use it in GitHub Desktop.
Play 2.5/Akka/Guice, starting an actor before anything else
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import actors.StartActorBrowser | |
import com.google.inject.AbstractModule | |
class Module extends AbstractModule { | |
def configure(): Unit = { | |
bind(classOf[StartActorBrowser]).asEagerSingleton() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StartActorBrowser @Inject()(implicit val system: ActorSystem) { | |
println("StartActorBrowserImpl started") | |
// actor code here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment