No qualifying bean of type [org.springframework.jms.core.JmsTemplate] is defined

注入JmsTemplate时:

    Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jms.core.JmsTemplate] is defined: expected single matching bean but found 2: jmsQueueTemplate,jmsTopicTemplate


原因:

NoUniqueBeanDefinitionException说是有两个JmsTemplate名字的bean。



你可能感兴趣的:(错误合集)