Disable more @Bean method proxying

Previously, due to a quirk in Spring Framework, it was necessary to use bean method
proxying in @Configuration classes that define one or more FactoryBeans. This quirk has
now been addressed so this commit disables bean method proxying where it is now no longer
needed.

Closes gh-16533
pull/16831/head
Andy Wilkinson 6 years ago
parent fddc8bd8ef
commit 552345fcd1

@ -754,7 +754,7 @@ public class KafkaAutoConfigurationTests {
} }
@Configuration @Configuration(proxyBeanMethods = false)
protected static class TestStreamsBuilderFactoryBeanConfiguration { protected static class TestStreamsBuilderFactoryBeanConfiguration {
@Bean @Bean

@ -75,7 +75,7 @@ public class JsonTestersAutoConfiguration {
null); null);
} }
@Configuration @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(ObjectMapper.class) @ConditionalOnClass(ObjectMapper.class)
static class JacksonJsonTestersConfiguration { static class JacksonJsonTestersConfiguration {
@ -89,7 +89,7 @@ public class JsonTestersAutoConfiguration {
} }
@Configuration @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(Gson.class) @ConditionalOnClass(Gson.class)
static class GsonJsonTestersConfiguration { static class GsonJsonTestersConfiguration {
@ -102,7 +102,7 @@ public class JsonTestersAutoConfiguration {
} }
@Configuration @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(Jsonb.class) @ConditionalOnClass(Jsonb.class)
static class JsonbJsonTesterConfiguration { static class JsonbJsonTesterConfiguration {

@ -49,7 +49,7 @@ public class TestRestTemplateContextCustomizerWithFactoryBeanTests {
assertThat(this.restTemplate).isNotNull(); assertThat(this.restTemplate).isNotNull();
} }
@Configuration @Configuration(proxyBeanMethods = false)
@ComponentScan("org.springframework.boot.test.web.client.scan") @ComponentScan("org.springframework.boot.test.web.client.scan")
static class TestClassWithFactoryBean { static class TestClassWithFactoryBean {

Loading…
Cancel
Save