I am trying to create a calm client using jaxrs: client, as defined at http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans. xml
In my test class, I get org.springframework.beans.factory.BeanCreationException: Error creating bean named "com.abc.service.ExportServiceTest": injection of auto-notified dependencies failed; The nested exception is org.springframework.beans.factory.BeanCreationException: Failed to create autwire field: private com.bankbazaar.service.ExportService com.abc.service.ExportServiceTest.exportClient; The nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: no bean match found for type [com.abc.service.ExportService] for the dependency: at least 1 bean is expected to qualify as an autwire candidate for this dependency. Dependency Annotations: {@ org.springframework.beans.factory.annotation.Autowired (required = true), @ org.springframework.beans.factory.annotation.Qualifier (value = exportClient)}
this is my spring configuration
However
exportClient=(ExportService)applicationContext.getBean("exportClient");
it works.
Thanks Himangshu
source
share