WELD-001408 Unsatisfied dependencies when injecting EJBs that implement interfaces

后端 未结 3 1135
孤独总比滥情好
孤独总比滥情好 2020-12-28 19:22

Here is the situation.

I\'ve got the following interfaces:

public interface Parent { }
public interface ChildOne extends Parent { }
public interf         


        
3条回答
  •  情话喂你
    2020-12-28 20:18

    Have you tried using @EJB annotation rather then the CDI @inject annotation?

    E.g.

    @Named
    @SessionScoped
    public class TestController implements Serializable {
    
        @EJB
        private FirstBean firstBean;
    
        @EJB
        private SecondBean secondBean;
    }
    

提交回复
热议问题