使用SpringBoot整合ActiveMQ自动注入JmsMessagingTemplate时候的问题
使用SpringBoot整合ActiveMQ自动注入JmsMessagingTemplate时候的问题
APPLICATION FAILED TO START
Description:
Field template in com.springboot.chapter7.service.imp.ProducerSericeImp required a bean of type ‘org.springframework.jms.core.JmsMessagingTemplate’ that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
The following candidates were found but could not be injected:
- Bean method ‘jmsMessagingTemplate’ in ‘JmsAutoConfiguration.MessagingTemplateConfiguration’ not loaded because Ancestor org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration did not match
Action:
Consider revisiting the entries above or defining a bean of type ‘org.springframework.jms.core.JmsMessagingTemplate’ in your configuration.
我看了一个博主的不知道他的错误是不是和我一样,但是我用他的方法可以改了之后就好了,我的springboot版本的2.2.1
<!-- 整合消息队列ActiveMQ --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-activemq</artifactId> </dependency> <!-- 如果配置线程池则加入 --> 就是这个我一开始在网上找的然后不行,后来把这个注释后使用下面的就可以了 <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-pool</artifactId> </dependency> <!--<dependency> <groupId>org.messaginghub</groupId> <artifactId>pooled-jms</artifactId> </dependency>-->
希望帮助到后来的同学
原文博客.
- 点赞
- 收藏
- 分享
- 文章举报
- springboot 整合 activemq,JmsMessagingTemplate注入失败
- 使用idea学习SpringBoot整合Mybatis,遇到mapper无法注入的问题
- springboot多模块化整合mybatis,出现mapper自动注入失败问题
- SpringBoot @AutowiredRestTemplate自动注入报:could not be found问题的理解和解决方案
- ActiveMQ使用spring JmsTemplate发送消息(一)
- SSH整合问题:struts2-spring-plugin自动注入action的属性所产生的问题
- [ 问题解决 ] Springboot整合elasticsearch @autowired注入ElasticsearchRepository为空
- ActiveMQ使用spring JmsTemplate发送消息(一)
- ActiveMQ使用spring JmsTemplate发送消息(一)
- 问题7:当使用jpa操作数据库的时候,插入数据到数据库使用主键自增策略时候报错:Springboot-jpa Table 'sell.hibernate_sequence' doesn't exist
- 【SpringBoot】SpringBoot整合ActiveMQ的简单使用
- ActiveMQ使用spring JmsTemplate发送消息(一)
- 学习淘淘商城第六十课(Spring与Activemq的整合及用JmsTemplate发送消息)
- (十七)SpringBoot之使用异步消息服务jms之ActiveMQ
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案 标签: spring 201
- SpringBoot系列十一:SpringBoot整合Restful架构(使用 RestTemplate 模版实现 Rest 服务调用、Swagger 集成、动态修改日志级别)
- ActiveMQ使用spring JmsTemplate发送消息(一)
- ActiveMQ使用spring JmsTemplate发送消息(一)
- 关于Struts在Spring中使用autowired 自动注入的问题
- Spring Boot @Autowired 没法自动注入的问题