-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Milestone
Description
错误日志:
Field propertyResolver in org.springframework.cloud.netflix.eureka.EurekaClientConfigBean required a single bean, but 2 were found:
- dubboScanBasePackagesPropertyResolver: defined by method 'dubboScanBasePackagesPropertyResolver' in class path resource [org/apache/dubbo/spring/boot/autoconfigure/DubboRelaxedBinding2AutoConfiguration.class]
- environment: a programmatically registered singleton
org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBinding2AutoConfiguration
public class DubboRelaxedBinding2AutoConfiguration {
@Bean(name = BASE_PACKAGES_PROPERTY_RESOLVER_BEAN_NAME)
public PropertyResolver dubboScanBasePackagesPropertyResolver(ConfigurableEnvironment environment) {
ConfigurableEnvironment propertyResolver = new AbstractEnvironment() {
protected void customizePropertySources(MutablePropertySources propertySources) {
Map<String, Object> dubboScanProperties = PropertySourcesUtils.getSubProperties(environment, DUBBO_SCAN_PREFIX);
propertySources.addLast(new MapPropertySource("dubboScanProperties", dubboScanProperties));
}
};
ConfigurationPropertySources.attach(propertyResolver);
return propertyResolver;
}
org.springframework.cloud.netflix.eureka.EurekaClientConfigBean
public class EurekaClientConfigBean implements EurekaClientConfig, Ordered {
@Autowired(required = false)
PropertyResolver propertyResolver;
Metadata
Metadata
Assignees
Labels
No labels