No bean corresponds to the point of injection CDI

3

I want to implement CDI. However when I use the @Inject annotation I am notified with this warning

"No bean matches the injection point"

Line of code I'm notified

@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 could be happening for this warning to appear?

    
asked by anonymous 13.07.2016 / 19:24

1 answer

1

In order to be used with CDI, your class must have a parameterless constructor or its parameterized constructor must be annotated with @Inject (but make sure the parameters are injected correctly).

    
22.07.2016 / 00:30