【ActiveMQ】消息生产者自动注入报错:Could not autowire. No beans of #39;JmsMessagingTemplate#39; type found...
使用ActiveMQ过程中,定义消息生产者:
package com.sxd.jms.producer;import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jms.core.JmsMessagingTemplate; import org.springframework.stereotype.Service;import javax.jms.Destination;@Service("producer") public class Producer1 {@Autowired // 也可以注入JmsTemplate,JmsMessagingTemplate对JmsTemplate进行了封装private JmsMessagingTemplate jmsTemplate;// 发送消息,destination是发送到的队列,message是待发送的消息public void sendMessage(Destination destination, final String message){jmsTemplate.convertAndSend(destination, message);}}
View Code
但是IDE报错:
启动编译,依旧是报错:
Description:Field jmsTemplate in com.sxd.jms.producer.Producer1 required a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' that could not be found.- Bean method 'jmsMessagingTemplate' not loaded because Ancestor org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration did not matchAction:Consider revisiting the conditions above or defining a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' in your configuration.
解决方式:
因为application.properties中配置ActiveMQ的相关配置后面有空格:
把配置后面的空格去掉。保存,重新编译。
解决了!!!!
【ActiveMQ】消息生产者自动注入报错:Could not autowire. No beans of #39;JmsMessagingTemplate#39; type found...相关推荐
- 【ActiveMQ】消息生产者自动注入报错:Could not autowire. No beans of 'JmsMessagingTemplate' type found
标签:public style hat and 报错 require core ota ati 使用ActiveMQ过程中,定义消息生产者: package com.s ...
- 【ActiveMQ】消息生产者自动注入报错:Could not autowire. No beans of 'JmsMessagingTemplate' type found...
使用ActiveMQ过程中,定义消息生产者: package com.sxd.jms.producer;import org.springframework.beans.factory.annotat ...
- 使用 @Resource或@Autowire时 Idea报错Could not autowire. No beans of 'xxxService' type found. more..出现红色波浪线
原博客:https://blog.csdn.net/qq_36802726/article/details/84026031 错误: 使用注解@Resource或者@Autowire intelli ...
- Java--使用@Autowired报错Could not autowire. No beans of ‘XX‘ type found.
使用@Autowired时报错如下: Could not autowire. No beans of 'XXXX' type found. 1.检查下导入对象类的路径:注入的时候,导入的对象类路径不对 ...
- SQL注入-盲注-时间注入-报错注入-布尔盲注-DNSlog注入-宽字节注入-WAF绕过-SqlMap使用
Sqli-labs的安装 1.安装WAMP http://www.wampserver.com/ WAMP是php + mysql + Apache环境集成工具 2.下载Sqli-labs https ...
- 解决非controller使用@Autowired注解注入报错为java.lang.NullPointerException问题
解决非controller使用@Autowired注解注入报错为java.lang.NullPointerException问题 参考文章: (1)解决非controller使用@Autowired注 ...
- SQLi LABS Less 27 联合注入+报错注入+布尔盲注+时间盲注
第27关是单引号字符型注入: 过滤了注释(/* -- #),关键字(select union),空格: 这篇文章提供联合注入.报错注入.布尔盲注.时间盲注四种解题方式. 其他 SQLi LABS 靶场 ...
- SQLi LABS Less-26 联合注入+报错注入+布尔盲注+时间盲注
第26关是单引号字符型注入: 后台过滤了关键字( and or ),注释(/* # -- /),空格: 这篇文章提供联合注入.报错注入.布尔盲注.时间盲注四种解题方式. 目录 一.功能分析 二 ...
- SQLi LABS Less 25 联合注入+报错注入+布尔盲注
第二十五关单引号字符型注入: 过滤了关键字(and.or),可以使用双写绕过: 这篇文章提供了联合注入.报错注入.布尔盲注三种解题方法. SQLi LABS 其余关卡可参考我的专栏:SQLi-LABS ...
- vite项目在jenkins自动打包报错:failed to load config from ../vite.config.js You installed esbuild on
vite项目在jenkins自动打包报错找不到esbuild-linux-64 在window环境开发用的找不到esbuild-windows-64,在linux环境构建需要使用esbuild-lin ...
最新文章
- python双引号和单引号区别_Python中单引号,双引号,3个单引号及3个双引号的区别...
- 考研英语一2011年真题模考总结
- Linux sed编辑器
- FioriLaunchpad.html的三个round-trip
- 简述汇编语言中的标号有什么规定_2020年秋季学期《汇编语言》在线考试 (适用于2020年12月份考试)【答案标准】...
- 牵手高通的百度是要拿科大讯飞开刀了?
- spring cloud config client refresh过程
- RMAN Crosscheck 和 Delete 命令的2个实例
- AD20使用之用封装创建向导创建封装
- 2020-08-31 ubuntu18.04下安装gitlab,以及使用邮箱注册
- 璞华PLM为全场景产品生命周期管理赋能,助力产品主线的企业数字化转型
- 【转】敏捷中国十八年目睹之怪现状
- 解决Ubuntu远程连接mysql连不上的问题
- python实现基于KNN算法的手写数字识别系统 非常详细!!!!
- 家用台式计算机需要安装的软件,新的电脑应该安装哪些应用?推荐这9个软件够你用一生!...
- 用pandas进行数据分析实战
- 充电口 米兔积木机器人_米兔积木机器人怎么充电
- 【转】抽象基类与接口,共性与个性的选择!
- 蚂蚁金服-支付宝内推面试总结(已拿到offer)
- [siggraph13]《命运》的实时渲染技术
热门文章
- 可视化,别把简单内容复杂化
- 优化理论17----wolfe_Powell准则、Wo1fe-Powell搜索法
- 深入理解目标检测与YOLO(从v1到v3)
- 如何在Python中实现尾递归优化
- python读取第一行设为字典_将csv读入字典,第一行成为名称
- 蓝桥杯2021年第十二届C++省赛第七题-砝码称重
- 创建虚拟文件系统设备文件节点_使用proc_create实例分析
- 编译android7.0出现的错误ninja: build stopped: subcommand failed.
- 【 Educational Codeforces Round 51 (Rated for Div. 2) F】The Shortest Statement
- LightOJ 1055 BFS暴力