Javier Cocco
unread,Jan 31, 2023, 9:33:57 AM1/31/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-guice
Hi, I have the following issue:
I need injection for constructor a Scala case class that has fields to store different configs
This class has a Boolean attributes:
case class ConfirmConfig @Inject()(
acceptAlternativeProviders: Seq[String],
acceptManualAlternativeProvidersDisabled: Seq[String],
acceptMoveAlternativeProvidersPerProduct: Map[String, Seq[String]],
skipValidateFlownSegmentsGolMailbox: Boolean)
I am injecting this class in a service class (wich has busisnes logical) as follows:
@Singleton
class GenerateReissueMaskOperation @Inject()(
revalidationService: RevalidationService,
reservationService: ReservationService,
confirmConfig: ConfirmConfig)
When I run the app I am getting this error:
No implementation for java.lang.Boolean (with no qualifier annotation) was bound, and could not find an injectable constructor. Injectable classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
at java.lang.Boolean.class(Boolean.java:43)
What does is neccesary to @Inject() can inyect a class wich has a Booolean Scala class argument in its constructor ?
Thank you very much to anyone who can give me a hand