解决Springboot 'jmsMessagingTemplate' not loaded because Ancestor org.springframework.boot.autoconfig

问题来源:
SpringBoot集成Activemq
报错内容:
Description:
Field jmsTemplate in com.xihuanyuye.Producer 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 match
-
Action:
Consider revisiting the conditions above or defining a bean of type ‘org.springframework.jms.core.JmsMessagingTemplate’ in your configuration.
原因:
配置文件中配置项spring.activemq.pool.enabled配置的值中有空格 导致实际的值设置没有成功

spring.activemq.broker-url=tcp://localhost:61616
spring.activemq.in-memory=true空格
spring.activemq.pool.enabled=false空格

猜你喜欢

转载自blog.csdn.net/xihuanyuye/article/details/80959177