springboot整合active,构建工具使用gradle。报错解决

1 篇文章 0 订阅

报错如下: 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-04-26 18:26:41.167 ERROR 5284 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field jmsMessagingTemplate in org.myself.gradle.active.service.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.


Process finished with exit code 1

build.gradle文件内容

group 'org.myself.gradle'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    maven {
        url "http://maven.aliyun.com/nexus/content/groups/public/"
    }
    mavenCentral()
}


dependencies {
    implementation "org.springframework.boot:spring-boot-starter-web:1.5.10.RELEASE"
    implementation 'org.springframework.boot:spring-boot-starter-test:1.5.10.RELEASE'
    implementation 'org.projectlombok:lombok:1.16.18'
    implementation 'org.springframework.boot:spring-boot-starter-activemq:1.5.10.RELEASE'
}

application.yml内容:

spring:
  application:
    name: gradle-active
  activemq:
    user: admin
    password: admin
    broker-url: tcp://127.0.0.1:61616
    pool:
      enabled: true
      max-connections: 10
    packages:
      trust-all: true

看下你的依赖是否缺少这个,添上启动成功

implementation 'org.apache.activemq:activemq-pool:5.15.1'

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值