【发布时间】: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