spring整合RabbitMQ配置异常

最近在整合RabbitMQ时spring报错

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: A 'connection-factory' attribute must be set.
Offending resource: ServletContext resource [/WEB-INF/spring/rabbitmq/config.xml]

从报错中可以看下,是某个bean缺少connection-factory的属性,仔细对比后发现是此处问题:


改后:


很傻的错误,太疏忽了,template一定要注意连接属性注入。

你可能感兴趣的:(spring整合RabbitMQ配置异常)