I have started recently working with play but 2 days ago i have seen a problem with DI I do my research and i asked about it in play's gitter group but nothing helps
so is it possible that play does'nt support this kind of DI? here is my code:
this is the trait:
import javax.inject.{Inject, Singleton}
trait UserDAO{
def save(user: Users): Unit
}
this is the Users cas class:
case class Users(id:String ,mail: String, password: String,role:Role)
this the module class for binding which is enabled in application.conf
class Module extends AbstractModule {
def configure() {
bind(classOf[UserDAO]).to(classOf [MongoUserDAO])
}
and class controller where i inject
class UsersController @Inject()( val userDAO: UserDAO ,
val components: MessagesControllerComponents)
extends MessagesAbstractController(components){
thanks for any help