No bean corresponds to CDI injection point
I am wanting to implement CDI. But when I use the @Inject annotation I am notified with this warning
"No bean matches Injection Point"
Line of code I'm notified of
@Inject private LancamentoDadosDao lancamentoDadosDao;
DAO class
@Component
@RequestScoped
public class LancamentoDadosDao {
private Session session;
private Result result;
public LancamentoDadosDao(Session session, Result result) {
this.session = session;
this.result = result;
}
}
What might be occurring for this warning to appear ?
3
Author: Ivan Alves, 2016-07-13
1 answers
To be used with CDI your class needs to have a constructor without parameters or your constructor with parameters must be annotated with @Inject (but make sure that the parameters will be injected correctly).
1
Author: Sérgio Mucciaccia, 2016-07-21 22:30:55