Hello All,
I want to understand how to define a bean of type below in spring config file. This is Auto wired.
@Autowired
@Qualifier("tvrrmImportQueueProcessor")
private Map<
String, DefaultMessageListenerContainer> tvrrmQueueProcessors;
But when I try to run my application I get below error:
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.Map com.theice.tradevault.tradecollector.config.TvrrmImportAppJmxConfiguration.tvrrmImportQueueProcessors; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jms.listener.DefaultMessageListenerContainer] found for dependency [map with value type org.springframework.jms.listener.DefaultMessageListenerContainer]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=tvrrmImportQueueProcessor)}
I have declared the bean as below in spring config.
<bean id="tvrrmImportQueueProcessor" class="java.util.HashMap"/>
thanks
Trupti