Pregunta

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);
¿Fue útil?

Solución

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 ?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top