From 15f9da86d47accfba72ec1d601f8a7863c158e0f Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Tue, 14 Aug 2018 13:43:03 +0200 Subject: [PATCH] Deprecated BinderFactoryConfiguration added deprecation message removed unused reference updated javadoc in BinderTypeRegistry Resolves #1430 Resolves #1434 --- .../cloud/stream/binder/BinderTypeRegistry.java | 5 ++--- .../cloud/stream/config/BinderFactoryConfiguration.java | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderTypeRegistry.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderTypeRegistry.java index e98b91488..6e588ace2 100644 --- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderTypeRegistry.java +++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderTypeRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,7 @@ import java.util.Map; /** * A registry of {@link BinderType}s, indexed by name. A {@link BinderTypeRegistry} bean * is created automatically based on information found in the - * {@literal META-INF/spring.binders} files provided by binder implementors. This can be - * overridden by registering a {@link BinderTypeRegistry} bean in the context. + * {@literal META-INF/spring.binders} files provided by binder implementors. * * @author Marius Bogoevici */ diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BinderFactoryConfiguration.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BinderFactoryConfiguration.java index 602226872..9ab964c1e 100644 --- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BinderFactoryConfiguration.java +++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BinderFactoryConfiguration.java @@ -30,14 +30,12 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.BeanCreationException; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.stream.binder.BinderType; import org.springframework.cloud.stream.binder.BinderTypeRegistry; -import org.springframework.cloud.stream.binder.DefaultBinderFactory; import org.springframework.cloud.stream.binder.DefaultBinderTypeRegistry; import org.springframework.cloud.stream.binding.CompositeMessageChannelConfigurer; import org.springframework.cloud.stream.binding.MessageChannelConfigurer; @@ -65,11 +63,14 @@ import org.springframework.util.StringUtils; * @author Ilayaperumal Gopinathan * @author Oleg Zhurakousky * @author Soby Chacko + * + * @deprecated since it really represents 'auto-configuration' it will be renamed/restructured in the next release. */ @Configuration @Role(BeanDefinition.ROLE_INFRASTRUCTURE) @EnableConfigurationProperties({ BindingServiceProperties.class }) @Import({ContentTypeConfiguration.class}) +@Deprecated public class BinderFactoryConfiguration { protected final Log logger = LogFactory.getLog(getClass()); @@ -82,9 +83,6 @@ public class BinderFactoryConfiguration { @Value("${" + SELF_CONTAINED_APP_PROPERTY_NAME + ":}") private String selfContained; - @Autowired(required = false) - private Collection binderFactoryListeners; - static Collection parseBinderConfigurations(ClassLoader classLoader, Resource resource) throws IOException, ClassNotFoundException { Properties properties = PropertiesLoaderUtils.loadProperties(resource);