-
Notifications
You must be signed in to change notification settings - Fork 12
Should dependency injection be used here? #5
Copy link
Copy link
Open
Description
I implemented a play 2.5 app with phantom a few months ago with very similar approach of this project. When going to production, I realized that I have to maintain a separate configuration file to specify the clusters and keyspaces. So I created a service with a trait and a Singleton class with play Configuration injection, and then initialize the contactpoint with settings from play configuration files. Then controllers can inject the service when needed. However, the service code is kind of ugly since extends AppDatabase(Defaults.Connector) cannot be done in a class. Is there an elegant way of doing this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels