Skip to content

Commit 361437f

Browse files
committed
Merge branch '1.5.x' into 2.0.x
2 parents fd8a269 + 821ee0c commit 361437f

File tree

22 files changed

+69
-24
lines changed

22 files changed

+69
-24
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/CompositeMeterRegistryConfiguration.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,13 +28,15 @@
2828
import org.springframework.boot.autoconfigure.condition.NoneNestedConditions;
2929
import org.springframework.context.annotation.Bean;
3030
import org.springframework.context.annotation.Conditional;
31+
import org.springframework.context.annotation.Configuration;
3132
import org.springframework.context.annotation.Primary;
3233

3334
/**
3435
* Configuration for a {@link CompositeMeterRegistry}.
3536
*
3637
* @author Andy Wilkinson
3738
*/
39+
@Configuration
3840
@Conditional(MultipleNonPrimaryMeterRegistriesCondition.class)
3941
class CompositeMeterRegistryConfiguration {
4042

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/scheduling/ScheduledTasksEndpointAutoConfigurationTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
import org.springframework.boot.autoconfigure.AutoConfigurations;
2525
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2626
import org.springframework.context.annotation.Bean;
27+
import org.springframework.context.annotation.Configuration;
2728

2829
import static org.assertj.core.api.Assertions.assertThat;
2930

@@ -60,6 +61,7 @@ public void endpointBacksOffWhenUserProvidedEndpointIsPresent() {
6061
.hasBean("customEndpoint"));
6162
}
6263

64+
@Configuration
6365
private static class CustomEndpointConfiguration {
6466

6567
@Bean

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/AbstractEndpointRequestIntegrationTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -91,6 +91,7 @@ String getBasicAuth() {
9191
return "Basic " + Base64.getEncoder().encodeToString("user:password".getBytes());
9292
}
9393

94+
@Configuration
9495
static class BaseConfiguration {
9596

9697
@Bean

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfigurationTests.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
2222
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
2323
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
2424
import org.springframework.context.annotation.Bean;
25+
import org.springframework.context.annotation.Configuration;
2526
import org.springframework.web.context.request.RequestContextListener;
2627
import org.springframework.web.filter.RequestContextFilter;
2728

@@ -72,6 +73,7 @@ public void contextShouldConfigureDispatcherServletPathWithRootPath() {
7273
.isEqualTo("/"));
7374
}
7475

76+
@Configuration
7577
static class ExistingConfig {
7678

7779
@Bean
@@ -81,6 +83,7 @@ public RequestContextFilter testRequestContextFilter() {
8183

8284
}
8385

86+
@Configuration
8487
static class RequestContextListenerConfig {
8588

8689
@Bean

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -114,6 +114,7 @@ public WebMvcMetricsFilter webMetricsFilter(MeterRegistry registry,
114114
"http.server.requests", true);
115115
}
116116

117+
@Configuration
117118
@RestController
118119
@RequestMapping("/api")
119120
@Timed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpointTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint.ScheduledTasksReport;
2929
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3030
import org.springframework.context.annotation.Bean;
31+
import org.springframework.context.annotation.Configuration;
3132
import org.springframework.scheduling.annotation.EnableScheduling;
3233
import org.springframework.scheduling.annotation.Scheduled;
3334
import org.springframework.scheduling.annotation.SchedulingConfigurer;
@@ -141,6 +142,7 @@ private void run(Class<?> configuration, Consumer<ScheduledTasksReport> consumer
141142
.accept(context.getBean(ScheduledTasksEndpoint.class).scheduledTasks()));
142143
}
143144

145+
@Configuration
144146
@EnableScheduling
145147
private static class BaseConfiguration {
146148

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
2626
import org.springframework.boot.context.properties.ConfigurationProperties;
2727
import org.springframework.boot.jdbc.DatabaseDriver;
2828
import org.springframework.context.annotation.Bean;
29+
import org.springframework.context.annotation.Configuration;
2930
import org.springframework.util.StringUtils;
3031

3132
/**
@@ -46,6 +47,7 @@ protected static <T> T createDataSource(DataSourceProperties properties,
4647
/**
4748
* Tomcat Pool DataSource configuration.
4849
*/
50+
@Configuration
4951
@ConditionalOnClass(org.apache.tomcat.jdbc.pool.DataSource.class)
5052
@ConditionalOnMissingBean(DataSource.class)
5153
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.tomcat.jdbc.pool.DataSource", matchIfMissing = true)
@@ -72,6 +74,7 @@ public org.apache.tomcat.jdbc.pool.DataSource dataSource(
7274
/**
7375
* Hikari DataSource configuration.
7476
*/
77+
@Configuration
7578
@ConditionalOnClass(HikariDataSource.class)
7679
@ConditionalOnMissingBean(DataSource.class)
7780
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "com.zaxxer.hikari.HikariDataSource", matchIfMissing = true)
@@ -93,6 +96,7 @@ public HikariDataSource dataSource(DataSourceProperties properties) {
9396
/**
9497
* DBCP DataSource configuration.
9598
*/
99+
@Configuration
96100
@ConditionalOnClass(org.apache.commons.dbcp2.BasicDataSource.class)
97101
@ConditionalOnMissingBean(DataSource.class)
98102
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.commons.dbcp2.BasicDataSource", matchIfMissing = true)
@@ -111,6 +115,7 @@ public org.apache.commons.dbcp2.BasicDataSource dataSource(
111115
/**
112116
* Generic DataSource configuration.
113117
*/
118+
@Configuration
114119
@ConditionalOnMissingBean(DataSource.class)
115120
@ConditionalOnProperty(name = "spring.datasource.type")
116121
static class Generic {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryConfiguration.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,6 +75,7 @@ public JettyReactiveWebServerFactory jettyReactiveWebServerFactory() {
7575

7676
}
7777

78+
@Configuration
7879
@ConditionalOnMissingBean(ReactiveWebServerFactory.class)
7980
@ConditionalOnClass({ Undertow.class })
8081
static class EmbeddedUndertow {

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -311,6 +311,7 @@ public JobExplorer getJobExplorer() throws Exception {
311311

312312
}
313313

314+
@Configuration
314315
@EnableBatchProcessing
315316
protected static class NamedJobConfigurationWithRegisteredJob {
316317

@@ -352,6 +353,7 @@ protected void doExecute(JobExecution execution) {
352353

353354
}
354355

356+
@Configuration
355357
@EnableBatchProcessing
356358
protected static class NamedJobConfigurationWithLocalJob {
357359

@@ -383,6 +385,7 @@ protected void doExecute(JobExecution execution) {
383385

384386
}
385387

388+
@Configuration
386389
@EnableBatchProcessing
387390
protected static class JobConfiguration {
388391

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@
3333
import org.springframework.boot.test.util.TestPropertyValues;
3434
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
3535
import org.springframework.context.annotation.Bean;
36+
import org.springframework.context.annotation.Configuration;
3637
import org.springframework.jmx.export.MBeanExporter;
3738

3839
import static org.assertj.core.api.Assertions.assertThat;
@@ -161,7 +162,8 @@ private void configureJndi(String name, DataSource dataSource)
161162
TestableInitialContextFactory.bind(name, dataSource);
162163
}
163164

164-
private static class MBeanExporterConfiguration {
165+
@Configuration
166+
static class MBeanExporterConfiguration {
165167

166168
@Bean
167169
MBeanExporter mbeanExporter() {
@@ -170,7 +172,8 @@ MBeanExporter mbeanExporter() {
170172

171173
}
172174

173-
private static class AnotherMBeanExporterConfiguration {
175+
@Configuration
176+
static class AnotherMBeanExporterConfiguration {
174177

175178
@Bean
176179
MBeanExporter anotherMbeanExporter() {

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import org.springframework.boot.test.util.TestPropertyValues;
2929
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
3030
import org.springframework.context.annotation.Bean;
31+
import org.springframework.context.annotation.Configuration;
3132
import org.springframework.kafka.annotation.KafkaListener;
3233
import org.springframework.kafka.core.DefaultKafkaProducerFactory;
3334
import org.springframework.kafka.core.KafkaTemplate;
@@ -97,6 +98,7 @@ private AnnotationConfigApplicationContext doLoad(Class<?>[] configs,
9798
return applicationContext;
9899
}
99100

101+
@Configuration
100102
public static class KafkaConfig {
101103

102104
@Bean

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -354,6 +354,7 @@ WebController webController() {
354354

355355
}
356356

357+
@Configuration
357358
public static class WebServerWithCustomMultipartResolver {
358359

359360
@Bean
@@ -363,6 +364,7 @@ MultipartResolver multipartResolver() {
363364

364365
}
365366

367+
@Configuration
366368
public static class ContainerWithCommonsMultipartResolver {
367369

368370
@Bean

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfigurationTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,6 +75,7 @@ private void serverContainerIsAvailableFromTheServletContext(
7575

7676
}
7777

78+
@Configuration
7879
static class CommonConfiguration {
7980

8081
@Bean

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/integrationtest/HttpTunnelIntegrationTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -128,6 +128,7 @@ public DispatcherFilter filter(
128128

129129
}
130130

131+
@Configuration
131132
static class TunnelConfiguration {
132133

133134
@Bean

spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/cloudfoundry/CloudFoundryCustomContextPathExample.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,12 +34,14 @@
3434
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
3535
import org.springframework.boot.web.servlet.ServletContextInitializer;
3636
import org.springframework.context.annotation.Bean;
37+
import org.springframework.context.annotation.Configuration;
3738

3839
/**
3940
* Example configuration for custom context path in Cloud Foundry.
4041
*
4142
* @author Johnny Lim
4243
*/
44+
@Configuration
4345
public class CloudFoundryCustomContextPathExample {
4446

4547
// tag::configuration[]

spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/CustomWebFluxSecurityExample.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
1818

1919
import org.springframework.boot.autoconfigure.security.reactive.PathRequest;
2020
import org.springframework.context.annotation.Bean;
21+
import org.springframework.context.annotation.Configuration;
2122
import org.springframework.security.config.web.server.ServerHttpSecurity;
2223
import org.springframework.security.web.server.SecurityWebFilterChain;
2324

@@ -26,6 +27,7 @@
2627
*
2728
* @author Madhura Bhave
2829
*/
30+
@Configuration
2931
public class CustomWebFluxSecurityExample {
3032

3133
// @formatter:off

0 commit comments

Comments
 (0)