开发环境:
1.springBoot 2.3.1.RELEASE
2.gradle 5.6
3.activeMQ 2.3.1.RELEASE
第一步:首先在build.gradle中导入activeMQ的依赖
buildscript {
dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-activemq', version: '2.3.1.RELEASE'
}
}
坐标可以在maven仓库中寻找地址:
第二步:在springBoot配置文件中配置activeMQ
activemq:
broker-url: tcp://localhost:61616
user: admin
password: admin
pool:
enabled: true
max-conn