May 2017
Intermediate to advanced
414 pages
13h
English
In this recipe, we covered what ServiceLocator is, how to access it, and how to use it. In this particular example, we modified our AkkacookbookServiceImpl class to have the service locator as a class parameter. Lagom understands that you need it in your service and injects it using dependency injection. The ServiceLocator is only a trait and its implementation should not be relevant for the services. This trait contains two main calls:
We use locate() to query the registry and print out where is the service running. Since we explicitly stated that our login service would be running ...
Read now
Unlock full access