我有一个依赖于Play的Configuration和WSClient实例的api服务类。 ,我不想使用@Inject()anotation因为我想使用编译时注射Macwire因此,我所做的是: // this is a trait that here im wiring all the dependencies that my api service needs
trait ApiDepende
注入特质我有一个Scala的特质 trait UserRepository {
def findByEmail(email: String): User
}
我想注入到这个服务与MacWire class AccountService(){
val userRepo = wire[UserRepository]
}
,然后在测试或类使用 class AccountS
我正在使用MacWire DI框架,并且出现了这个错误。 Found multiple values of type [play.api.mvc.DefaultActionBuilder]: [List(defaultActionBuilder, Action)]
[error] override lazy val controllerComponents: DefaultControllerC