Adding proxyBeanMethods = false to configuration. Fixes #1362
This commit is contained in:
@@ -153,7 +153,7 @@ import static org.springframework.cloud.gateway.config.HttpClientProperties.Pool
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMissing = true)
|
||||
@EnableConfigurationProperties
|
||||
@AutoConfigureBefore({ HttpHandlerAutoConfiguration.class,
|
||||
@@ -554,7 +554,7 @@ public class GatewayAutoConfiguration {
|
||||
return new RequestHeaderSizeGatewayFilterFactory();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(HttpClient.class)
|
||||
protected static class NettyConfiguration {
|
||||
|
||||
@@ -699,7 +699,7 @@ public class GatewayAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ HystrixObservableCommand.class, RxReactiveStreams.class })
|
||||
protected static class HystrixConfiguration {
|
||||
|
||||
@@ -717,7 +717,7 @@ public class GatewayAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(Health.class)
|
||||
protected static class GatewayActuatorConfiguration {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.web.reactive.DispatcherHandler;
|
||||
/**
|
||||
* @author Ryan Baxter
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMissing = true)
|
||||
@AutoConfigureAfter({ ReactiveResilience4JAutoConfiguration.class,
|
||||
HystrixCircuitBreakerAutoConfiguration.class })
|
||||
@@ -46,7 +46,7 @@ import org.springframework.web.reactive.DispatcherHandler;
|
||||
HystrixCircuitBreakerAutoConfiguration.class })
|
||||
public class GatewayCircuitBreakerAutoConfiguration {
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ ReactiveCircuitBreakerFactory.class,
|
||||
ReactiveHystrixCircuitBreakerFactory.class })
|
||||
protected static class SpringCloudCircuitBreakerHystrixConfiguration {
|
||||
@@ -68,7 +68,7 @@ public class GatewayCircuitBreakerAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ ReactiveCircuitBreakerFactory.class,
|
||||
ReactiveResilience4JCircuitBreakerFactory.class })
|
||||
protected static class Resilience4JConfiguration {
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AutoConfigureBefore(GatewayAutoConfiguration.class)
|
||||
public class GatewayClassPathWarningAutoConfiguration {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class GatewayClassPathWarningAutoConfiguration {
|
||||
|
||||
private static final String BORDER = "\n\n**********************************************************\n\n";
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(name = "org.springframework.web.servlet.DispatcherServlet")
|
||||
protected static class SpringMvcFoundOnClasspathConfiguration {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class GatewayClassPathWarningAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnMissingClass("org.springframework.web.reactive.DispatcherHandler")
|
||||
protected static class WebfluxMissingFromClasspathConfiguration {
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.web.reactive.DispatcherHandler;
|
||||
* @author Spencer Gibb
|
||||
* @author Olga Maciaszek-Sharma
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ LoadBalancerClient.class, RibbonAutoConfiguration.class,
|
||||
DispatcherHandler.class })
|
||||
@AutoConfigureAfter(RibbonAutoConfiguration.class)
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.reactive.DispatcherHandler;
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMissing = true)
|
||||
@EnableConfigurationProperties(GatewayMetricsProperties.class)
|
||||
@AutoConfigureBefore(HttpHandlerAutoConfiguration.class)
|
||||
|
||||
@@ -41,7 +41,7 @@ import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.G
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnMissingClass("org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration")
|
||||
@ConditionalOnMissingBean(LoadBalancerClient.class)
|
||||
@EnableConfigurationProperties(LoadBalancerProperties.class)
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.web.reactive.DispatcherHandler;
|
||||
* @author Spencer Gibb
|
||||
* @author Olga Maciaszek-Sharma
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ ReactiveLoadBalancer.class, LoadBalancerAutoConfiguration.class,
|
||||
DispatcherHandler.class })
|
||||
@AutoConfigureBefore(GatewayLoadBalancerClientAutoConfiguration.class)
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.data.redis.core.script.RedisScript;
|
||||
import org.springframework.scripting.support.ResourceScriptSource;
|
||||
import org.springframework.web.reactive.DispatcherHandler;
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@AutoConfigureAfter(RedisReactiveAutoConfiguration.class)
|
||||
@AutoConfigureBefore(GatewayAutoConfiguration.class)
|
||||
@ConditionalOnBean(ReactiveRedisTemplate.class)
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping;
|
||||
*
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(SimpleUrlHandlerMapping.class)
|
||||
@ConditionalOnProperty(
|
||||
name = "spring.cloud.gateway.globalcors.add-to-simple-url-handler-mapping",
|
||||
|
||||
@@ -45,7 +45,7 @@ import static org.springframework.cloud.gateway.support.NameUtils.normalizeRoute
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMissing = true)
|
||||
@AutoConfigureBefore(GatewayAutoConfiguration.class)
|
||||
@AutoConfigureAfter(CompositeDiscoveryClientAutoConfiguration.class)
|
||||
@@ -88,7 +88,7 @@ public class GatewayDiscoveryClientAutoConfiguration {
|
||||
return properties;
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(value = "spring.cloud.discovery.reactive.enabled",
|
||||
matchIfMissing = true)
|
||||
public static class ReactiveDiscoveryClientRouteDefinitionLocatorConfiguration {
|
||||
@@ -106,7 +106,7 @@ public class GatewayDiscoveryClientAutoConfiguration {
|
||||
/**
|
||||
* @deprecated In favor of the native reactive service discovery capability.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Deprecated
|
||||
@ConditionalOnProperty(value = "spring.cloud.discovery.reactive.enabled",
|
||||
havingValue = "false")
|
||||
|
||||
@@ -114,7 +114,7 @@ class ExceptionFallbackHandler {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
class TestBadRibbonConfig {
|
||||
|
||||
@LocalServerPort
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RouteBuilderTests {
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class SpringConfig {
|
||||
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class BaseWebClientTests {
|
||||
.build();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@RibbonClients({
|
||||
@RibbonClient(name = "testservice", configuration = TestRibbonConfig.class) })
|
||||
@Import(PermitAllSecurityConfiguration.class)
|
||||
|
||||
@@ -42,7 +42,7 @@ public class GatewayTestApplication {
|
||||
* `--spring.profiles.active=discovery` should be able to hit
|
||||
* http://localhost:8008/configserver/foo/default a normal configserver api
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableDiscoveryClient
|
||||
@Profile("discovery")
|
||||
protected static class GatewayDiscoveryConfiguration {
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
||||
import org.springframework.security.web.server.SecurityWebFilterChain;
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class PermitAllSecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -220,7 +220,7 @@ public class SseIntegrationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableWebFlux
|
||||
@SuppressWarnings("unused")
|
||||
static class TestConfiguration {
|
||||
@@ -232,7 +232,7 @@ public class SseIntegrationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAutoConfiguration
|
||||
@Import(PermitAllSecurityConfiguration.class)
|
||||
protected static class GatewayConfig {
|
||||
|
||||
@@ -261,7 +261,7 @@ public class WebSocketIntegrationTests {
|
||||
}).block(Duration.ofMillis(5000));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
static class WebSocketTestConfig {
|
||||
|
||||
@Bean
|
||||
@@ -355,7 +355,7 @@ public class WebSocketIntegrationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAutoConfiguration
|
||||
@Import(PermitAllSecurityConfiguration.class)
|
||||
@RibbonClient(name = "wsservice",
|
||||
|
||||
@@ -118,6 +118,6 @@ class RouteDslTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAutoConfiguration
|
||||
open class Config {}
|
||||
@@ -44,7 +44,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnWebApplication
|
||||
@ConditionalOnClass({ HandlerMethodReturnValueHandler.class })
|
||||
@EnableConfigurationProperties(ProxyProperties.class)
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.cloud.gateway.route.builder.routes
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
open class AdditionalRoutes {
|
||||
|
||||
@Value("\${test.uri:http://httpbin.org:80}")
|
||||
|
||||
@@ -178,7 +178,7 @@ public class GatewaySampleApplicationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAutoConfiguration
|
||||
@RibbonClient(name = "httpbin", configuration = RibbonConfig.class)
|
||||
@Import(GatewaySampleApplication.class)
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.web.reactive.result.method.annotation.ArgumentResolve
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnWebApplication
|
||||
@ConditionalOnClass({ HandlerMethodReturnValueHandler.class })
|
||||
@EnableConfigurationProperties(ProxyProperties.class)
|
||||
|
||||
Reference in New Issue
Block a user