Reduce need for bean method proxying and disable where not needed

Closes gh-9068
This commit is contained in:
Andy Wilkinson
2019-02-08 14:51:38 +00:00
parent 0f71f22f3c
commit 68bfb020aa
887 changed files with 2574 additions and 2542 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -86,7 +86,7 @@ public class RemoteUrlPropertyExtractorTests {
return application.run(args);
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class Config {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -116,7 +116,7 @@ public abstract class AbstractDevToolsDataSourceAutoConfigurationTests {
return context;
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class SingleDataSourceConfiguration {
@Bean
@@ -126,7 +126,7 @@ public abstract class AbstractDevToolsDataSourceAutoConfigurationTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class MultipleDataSourcesConfiguration {
@Bean
@@ -141,7 +141,7 @@ public abstract class AbstractDevToolsDataSourceAutoConfigurationTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class DataSourceSpyConfiguration {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -271,14 +271,14 @@ public class LocalDevToolsAutoConfigurationTests {
return properties;
}
@Configuration
@Configuration(proxyBeanMethods = false)
@Import({ ServletWebServerFactoryAutoConfiguration.class,
LocalDevToolsAutoConfiguration.class, ThymeleafAutoConfiguration.class })
public static class Config {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@ImportAutoConfiguration({ ServletWebServerFactoryAutoConfiguration.class,
LocalDevToolsAutoConfiguration.class, ThymeleafAutoConfiguration.class })
public static class ConfigWithMockLiveReload {
@@ -290,14 +290,14 @@ public class LocalDevToolsAutoConfigurationTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@Import({ ServletWebServerFactoryAutoConfiguration.class,
LocalDevToolsAutoConfiguration.class, ResourceProperties.class })
public static class WebResourcesConfig {
}
@Configuration
@Configuration(proxyBeanMethods = false)
public static class SessionRedisTemplateConfig {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -181,7 +181,7 @@ public class RemoteDevToolsAutoConfigurationTests {
this.context.refresh();
}
@Configuration
@Configuration(proxyBeanMethods = false)
@Import(RemoteDevToolsAutoConfiguration.class)
static class Config {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -91,7 +91,7 @@ public class ClassPathFileSystemWatcherTests {
context.close();
}
@Configuration
@Configuration(proxyBeanMethods = false)
public static class Config {
public final Environment environment;
@@ -101,12 +101,13 @@ public class ClassPathFileSystemWatcherTests {
}
@Bean
public ClassPathFileSystemWatcher watcher() {
public ClassPathFileSystemWatcher watcher(
ClassPathRestartStrategy restartStrategy) {
FileSystemWatcher watcher = new FileSystemWatcher(false,
Duration.ofMillis(100), Duration.ofMillis(10));
URL[] urls = this.environment.getProperty("urls", URL[].class);
return new ClassPathFileSystemWatcher(
new MockFileSystemWatcherFactory(watcher), restartStrategy(), urls);
new MockFileSystemWatcherFactory(watcher), restartStrategy, urls);
}
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -114,18 +114,18 @@ public class DevToolPropertiesIntegrationTests {
.isEqualTo(ErrorProperties.IncludeStacktrace.ALWAYS.toString());
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class TestConfiguration {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty("spring.h2.console.enabled")
static class ClassConditionConfiguration {
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class BeanConditionConfiguration {
@Bean

View File

@@ -94,7 +94,7 @@ public class HttpTunnelIntegrationTests {
tunnelContext.close();
}
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class ServerConfiguration {
@@ -128,7 +128,7 @@ public class HttpTunnelIntegrationTests {
}
@org.springframework.context.annotation.Configuration
@org.springframework.context.annotation.Configuration(proxyBeanMethods = false)
static class TunnelConfiguration {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -160,7 +160,7 @@ public class RemoteClientConfigurationTests {
this.clientContext.refresh();
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class Config {
@Bean
@@ -183,7 +183,7 @@ public class RemoteClientConfigurationTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
static class ClientConfig {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
@@ -91,7 +91,7 @@ public class OnInitializedRestarterConditionTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
public static class Config {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2019 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.
@@ -59,7 +59,7 @@ public class RestartScopeInitializerTests {
return application.run();
}
@Configuration
@Configuration(proxyBeanMethods = false)
public static class Config {
@Bean