문제

When I use the iPOJO and the @Requires annotation it is not injected into the consumer.

Consumer:

@Component
@Provides
@Instantiate
@Content(name = "bean")
public class BeanContentHandler extends ContentHandler
{  
    @Requires
    private IContentMapper mapper;

Provider:

@Component
@Provides
public class JcromContentMapper implements IContentMapper
{
    protected static final Jcrom JCROM = new Jcrom(true, false);
도움이 되었습니까?

해결책

I see two potential issues:

  • What is doing the @Content annotation ?
  • Your provider is not instantiated (add an @Instantiate annotation on it)

Can you also tell me where is used the mapper field ?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top