Greetings,
I am working on getting a Play 2.3.8 App working in 2.4 and I am having a problem I couldnt find documentaiton for.
I have a class that records modifications to a user wallet as transactions in the system. Right now I look up those transaction descriptions in the messages API like so:
class Wallet {
def depositFundsFromCAMS(usdCents: Long)
val description = MessagesApi("txn.cams.deposit", ccLastFour)
val txn = UserWalletTxn.createCamsTxn(this, user, description, usdCents)
// and so on...
}
}
Now in the new Play 2.4 the messages is an Injected API but this code is not injected, created by play or otherwise. It is an entity object stored in persistence. Are the APIs that were injected now not available ot anything not created by the injector? That would be a serious problem because we would have to re-implement the architecture. I am not a big fan of Anemic domain models (Object Oriented means data + behavior, C structs are a bummer).
How would I implement this in the new Play? What is the proscribed recomended process?
Thanks