From 987a53a850633b42ee1284f0dc90b2f0ad4dc2d3 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Wed, 13 Nov 2019 14:08:46 +0100 Subject: [PATCH] Update auto-configuration to use @Configuration(proxyBeanMethods=false); fixes gh-236 --- .../zookeeper/config/ZookeeperConfigAutoConfiguration.java | 4 ++-- .../config/ZookeeperConfigBootstrapConfiguration.java | 2 +- .../cloud/zookeeper/ZookeeperAutoConfiguration.java | 2 +- .../cloud/zookeeper/ZookeeperHealthAutoConfiguration.java | 2 +- .../zookeeper/discovery/RibbonZookeeperAutoConfiguration.java | 2 +- .../discovery/ZookeeperDiscoveryAutoConfiguration.java | 4 ++-- .../discovery/ZookeeperDiscoveryClientConfiguration.java | 2 +- .../discovery/ZookeeperRibbonClientConfiguration.java | 2 +- .../configclient/ZookeeperConfigServerAutoConfiguration.java | 2 +- ...perDiscoveryClientConfigServiceBootstrapConfiguration.java | 2 +- .../dependency/DependencyFeignClientAutoConfiguration.java | 2 +- .../dependency/DependencyRestTemplateAutoConfiguration.java | 2 +- .../dependency/DependencyRibbonAutoConfiguration.java | 2 +- .../dependency/ZookeeperDependenciesAutoConfiguration.java | 2 +- .../ZookeeperReactiveDiscoveryClientConfiguration.java | 2 +- .../discovery/watcher/DependencyWatcherAutoConfiguration.java | 2 +- .../ZookeeperAutoServiceRegistrationAutoConfiguration.java | 2 +- .../ZookeeperServiceRegistryAutoConfiguration.java | 2 +- .../support/CuratorServiceDiscoveryAutoConfiguration.java | 2 +- .../cloud/zookeeper/sample/SampleZookeeperApplication.java | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigAutoConfiguration.java b/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigAutoConfiguration.java index 05ab49547..8822eaf02 100644 --- a/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigAutoConfiguration.java +++ b/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigAutoConfiguration.java @@ -32,12 +32,12 @@ * @author Spencer Gibb * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperEnabled @ConditionalOnProperty(value = "spring.cloud.zookeeper.config.enabled", matchIfMissing = true) public class ZookeeperConfigAutoConfiguration { - @Configuration + @Configuration(proxyBeanMethods = false) @ConditionalOnClass(RefreshEndpoint.class) protected static class ZkRefreshConfiguration { diff --git a/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigBootstrapConfiguration.java b/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigBootstrapConfiguration.java index 9742c61d4..a34d60d1e 100644 --- a/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigBootstrapConfiguration.java +++ b/spring-cloud-zookeeper-config/src/main/java/org/springframework/cloud/zookeeper/config/ZookeeperConfigBootstrapConfiguration.java @@ -31,7 +31,7 @@ * @author Spencer Gibb * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperEnabled @Import(ZookeeperAutoConfiguration.class) public class ZookeeperConfigBootstrapConfiguration { diff --git a/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperAutoConfiguration.java b/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperAutoConfiguration.java index c90a2e5d1..407fa3d50 100644 --- a/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperAutoConfiguration.java +++ b/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperAutoConfiguration.java @@ -37,7 +37,7 @@ * @author Spencer Gibb * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperEnabled @EnableConfigurationProperties public class ZookeeperAutoConfiguration { diff --git a/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperHealthAutoConfiguration.java b/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperHealthAutoConfiguration.java index 446627bf9..bdc430b54 100644 --- a/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperHealthAutoConfiguration.java +++ b/spring-cloud-zookeeper-core/src/main/java/org/springframework/cloud/zookeeper/ZookeeperHealthAutoConfiguration.java @@ -34,7 +34,7 @@ * @author Tom Gianos * @since 2.0.1 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperEnabled @ConditionalOnClass(Endpoint.class) @AutoConfigureAfter({ ZookeeperAutoConfiguration.class }) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/RibbonZookeeperAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/RibbonZookeeperAutoConfiguration.java index c85ca236e..0317e0e21 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/RibbonZookeeperAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/RibbonZookeeperAutoConfiguration.java @@ -32,7 +32,7 @@ * @author Dave Syer * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties @ConditionalOnZookeeperEnabled @ConditionalOnBean(SpringClientFactory.class) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoConfiguration.java index 8e2d83c30..ee1189f1b 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryAutoConfiguration.java @@ -39,7 +39,7 @@ * @author Tim Ysewyn * @since 1.1.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnDiscoveryEnabled @ConditionalOnZookeeperDiscoveryEnabled @AutoConfigureBefore({ CommonsClientAutoConfiguration.class, @@ -62,7 +62,7 @@ public ZookeeperServiceWatch zookeeperServiceWatch( return new ZookeeperServiceWatch(curator, zookeeperDiscoveryProperties); } - @Configuration + @Configuration(proxyBeanMethods = false) @ConditionalOnClass({ Endpoint.class, HealthIndicator.class }) protected static class ZookeeperDiscoveryHealthConfig { diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryClientConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryClientConfiguration.java index c5eac59a5..d9b4bf285 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryClientConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryClientConfiguration.java @@ -35,7 +35,7 @@ * @author Tim Ysewyn * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnDiscoveryEnabled @ConditionalOnBlockingDiscoveryEnabled @ConditionalOnZookeeperDiscoveryEnabled diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperRibbonClientConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperRibbonClientConfiguration.java index fd200b45d..42ddb699b 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperRibbonClientConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/ZookeeperRibbonClientConfiguration.java @@ -54,7 +54,7 @@ * @author Marcin Grzejszczak * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class ZookeeperRibbonClientConfiguration { private static final Log log = LogFactory diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerAutoConfiguration.java index 245ab142c..82c8ee7a3 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerAutoConfiguration.java @@ -33,7 +33,7 @@ * * @author Dave Syer */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties @ConditionalOnClass({ ZookeeperDiscoveryProperties.class, CuratorFramework.class, ConfigServerProperties.class }) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperDiscoveryClientConfigServiceBootstrapConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperDiscoveryClientConfigServiceBootstrapConfiguration.java index 95b8e635b..c0962a07a 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperDiscoveryClientConfigServiceBootstrapConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperDiscoveryClientConfigServiceBootstrapConfiguration.java @@ -40,7 +40,7 @@ */ @ConditionalOnClass(ConfigServicePropertySourceLocator.class) @ConditionalOnProperty(value = "spring.cloud.config.discovery.enabled", matchIfMissing = false) -@Configuration +@Configuration(proxyBeanMethods = false) @Import({ ZookeeperAutoConfiguration.class, ZookeeperDiscoveryClientConfiguration.class, CuratorServiceDiscoveryAutoConfiguration.class, ZookeeperDiscoveryAutoConfiguration.class }) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyFeignClientAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyFeignClientAutoConfiguration.java index 097b6c5af..eee181a16 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyFeignClientAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyFeignClientAutoConfiguration.java @@ -48,7 +48,7 @@ * @author Marcin Grzejszczak * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnDependenciesPassed @ConditionalOnZookeeperEnabled @ConditionalOnProperty(value = "spring.cloud.zookeeper.dependency.headers.enabled", matchIfMissing = true) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRestTemplateAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRestTemplateAutoConfiguration.java index 1f3da38e5..47ce7853f 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRestTemplateAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRestTemplateAutoConfiguration.java @@ -45,7 +45,7 @@ * @author Marcin Grzejszczak * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperEnabled @ConditionalOnRibbonZookeeper @ConditionalOnDependenciesPassed diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRibbonAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRibbonAutoConfiguration.java index 803b30307..f659fccaf 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRibbonAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/DependencyRibbonAutoConfiguration.java @@ -43,7 +43,7 @@ * @author Marcin Grzejszczak * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperEnabled @ConditionalOnRibbonZookeeper @ConditionalOnDependenciesPassed diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDependenciesAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDependenciesAutoConfiguration.java index 63a4bd649..6c01b51fe 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDependenciesAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDependenciesAutoConfiguration.java @@ -30,7 +30,7 @@ * @author Marcin Grzejszczak * @since 1.0.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties @ConditionalOnZookeeperEnabled @ConditionalOnDependenciesPassed diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/reactive/ZookeeperReactiveDiscoveryClientConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/reactive/ZookeeperReactiveDiscoveryClientConfiguration.java index 0ab45e9d1..cf506faf3 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/reactive/ZookeeperReactiveDiscoveryClientConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/reactive/ZookeeperReactiveDiscoveryClientConfiguration.java @@ -45,7 +45,7 @@ * @author Tim Ysewyn * @since 2.2.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnDiscoveryEnabled @ConditionalOnReactiveDiscoveryEnabled @ConditionalOnZookeeperDiscoveryEnabled diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/watcher/DependencyWatcherAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/watcher/DependencyWatcherAutoConfiguration.java index f5e6c436e..e3dbd6614 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/watcher/DependencyWatcherAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/watcher/DependencyWatcherAutoConfiguration.java @@ -43,7 +43,7 @@ * @since 1.0.0 * @see ZookeeperDependencies */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableConfigurationProperties @ConditionalOnZookeeperEnabled @ConditionalOnDependenciesPassed diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperAutoServiceRegistrationAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperAutoServiceRegistrationAutoConfiguration.java index 93cdb0e6a..e8a978815 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperAutoServiceRegistrationAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperAutoServiceRegistrationAutoConfiguration.java @@ -34,7 +34,7 @@ /** * @author Spencer Gibb */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnMissingBean(type = "org.springframework.cloud.zookeeper.discovery.ZookeeperLifecycle") @ConditionalOnZookeeperDiscoveryEnabled @ConditionalOnProperty(value = "spring.cloud.service-registry.auto-registration.enabled", matchIfMissing = true) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperServiceRegistryAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperServiceRegistryAutoConfiguration.java index 541453059..eeecb9e4c 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperServiceRegistryAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/serviceregistry/ZookeeperServiceRegistryAutoConfiguration.java @@ -37,7 +37,7 @@ /** * @author Spencer Gibb */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnZookeeperDiscoveryEnabled @ConditionalOnProperty(value = "spring.cloud.service-registry.enabled", matchIfMissing = true) @AutoConfigureBefore(ServiceRegistryAutoConfiguration.class) diff --git a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/support/CuratorServiceDiscoveryAutoConfiguration.java b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/support/CuratorServiceDiscoveryAutoConfiguration.java index 5ae4fd4fc..c3bd12e30 100644 --- a/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/support/CuratorServiceDiscoveryAutoConfiguration.java +++ b/spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/support/CuratorServiceDiscoveryAutoConfiguration.java @@ -36,7 +36,7 @@ /** * @author Spencer Gibb */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnDiscoveryEnabled @ConditionalOnZookeeperDiscoveryEnabled @AutoConfigureBefore({ ZookeeperDiscoveryAutoConfiguration.class, diff --git a/spring-cloud-zookeeper-sample/src/main/java/org/springframework/cloud/zookeeper/sample/SampleZookeeperApplication.java b/spring-cloud-zookeeper-sample/src/main/java/org/springframework/cloud/zookeeper/sample/SampleZookeeperApplication.java index 04761576b..3038718fc 100644 --- a/spring-cloud-zookeeper-sample/src/main/java/org/springframework/cloud/zookeeper/sample/SampleZookeeperApplication.java +++ b/spring-cloud-zookeeper-sample/src/main/java/org/springframework/cloud/zookeeper/sample/SampleZookeeperApplication.java @@ -39,7 +39,7 @@ /** * @author Spencer Gibb */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableAutoConfiguration @RestController @EnableFeignClients