【问题标题】:Spring boot 1.3 M2 failed to start the embedded containerspring boot 1.3 M2启动嵌入式容器失败
【发布时间】:2015-07-14 18:15:58
【问题描述】:

我正在尝试将 apring boot 1.2.5 迁移到 1.3.0.M2,得到以下异常... 有什么建议吗?

Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.boot.autoconfigure.web.ServerProperties] is defined: expected single matching bean but found 2: serverProperties,server.CONFIGURATION_PROPERTIES
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1073)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:961)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:543)
... 38 more

【问题讨论】:

  • 显然您配置了两个 ServerProperties 实例。但是没有你实际的 Spring 配置,就没什么好说的了。
  • 这是问题所在,我在代码或 application.properties 文件中都没有嵌入式容器的任何配置

标签: spring spring-boot


【解决方案1】:

您可能遇到了错误,请参阅Duplicate bean definition for ServerProperties when using Spring Session in a hierarchical context。它将在 1.3.0.RC1 中修复。

【讨论】:

    猜你喜欢
    • 2014-06-27
    • 2016-12-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-20
    • 2022-01-19
    • 1970-01-01
    • 2021-02-19
    相关资源
    最近更新 更多