E%3Dmc%B2 2019-09-16 11:59 采纳率: 0%
浏览 5182

springcloud项目引入spring-cloud-starter-bus-amqp依赖后启动报错Failed to bind properties under 'server.error.include-stacktrace'

springcloud项目中加入如下依赖后不能正常启动:

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>

报如下错误:

2019-09-16 11:50:59.236 WARN  [restartedMain] org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext -Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servletWebServerFactoryCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'servletWebServerFactoryCustomizer' parameter 0; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'server-org.springframework.boot.autoconfigure.web.ServerProperties': Could not bind properties to 'ServerProperties' : prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'server.error.include-stacktrace' to org.springframework.boot.autoconfigure.web.ErrorProperties$IncludeStacktrace 
2019-09-16 11:50:59.273 INFO  [restartedMain] org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 
2019-09-16 11:50:59.275 INFO  [restartedMain] com.netflix.discovery.DiscoveryClient -Shutting down DiscoveryClient ... 
2019-09-16 11:50:59.291 INFO  [restartedMain] com.netflix.discovery.DiscoveryClient -Completed shut down of DiscoveryClient 
2019-09-16 11:50:59.301 ERROR [restartedMain] org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -

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

Description:

Failed to bind properties under 'server.error.include-stacktrace' to org.springframework.boot.autoconfigure.web.ErrorProperties$IncludeStacktrace:

    Property: server.error.include-stacktrace
    Value: ALWAYS
    Origin: "server.error.include-stacktrace" from property source "devtools"
    Reason: 0

Action:

Update your application's configuration

要如何解决???

  • 写回答

2条回答 默认 最新

  • 关注
    评论

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?