JmsTemplate injection failed, solution

JmsTemplate injection failed, solution

Check whether the corresponding pool-jms package is not imported when the mq pool is enabled

#开启池造成注入失败
spring.activemq.pool.enabled=true
spring.activemq.pool.max-connections=10

can choose to close

spring.activemq.pool.enabled=false
spring.activemq.pool.max-connections=10

Or import the package for

springboot 2.1+ and above, maven configuration dependencies

<dependency>
	<groupId>org.messaginghub</groupId>
	<artifactId>pooled-jms</artifactId>
</dependency>

When using springboot2.0+ and below, maven configuration depends on:

<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-pool</artifactId>
</dependency>

Guess you like

Origin blog.csdn.net/Little_Matches/article/details/125282067