1

In a Spring project I am trying to get injection to work in OVal (a SourceForge library) custom validators (CheckWith implementations). The OVal injector contains roughtly:

public class SpringInjector {
    @Autowired
    private AutowiredAnnotationBeanPostProcessor processor;
}

and according to the OVal documentation is supposed to be declared this way: <bean class="net.sf.oval.integration.spring.SpringInjector" />. The problem is that there are already 3 candidates for injection. Is there a way to override the @Autowire in the XML config given that the processor variable has no accessor methods? Or any other way to get injection to work in OVal custom validators?

Bolot
  • 95
  • 8
  • According to the [docs](http://oval.sourceforge.net/userguide.html#spring-integration), which you are probably quoting, OVal & Spring can be easily integrated. However at this point I fail to properly understand your problem. If you simply need to chose one of multiple similar beans you could mark it as primary with `` but I'd like to know which `3 candidates` we are talking about in your scenario. Can you share your spring configuration and any error message you may be getting? – Morfic Apr 22 '15 at 21:35

1 Answers1

0

Add this:

<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>
<bean class="net.sf.oval.integration.spring.SpringInjector"/> 
birkhuff
  • 1
  • 1