Merge branch '2.1.x'

This commit is contained in:
Andy Wilkinson
2019-03-11 16:40:19 +00:00
27 changed files with 78 additions and 23 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.
@@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandi
import org.springframework.boot.autoconfigure.condition.NoneNestedConditions;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
/**
@@ -35,6 +36,7 @@ import org.springframework.context.annotation.Primary;
*
* @author Andy Wilkinson
*/
@Configuration
@Conditional(MultipleNonPrimaryMeterRegistriesCondition.class)
class CompositeMeterRegistryConfiguration {

View File

@@ -23,12 +23,14 @@ import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
import org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Shared configuration for Jersey-based actuators regardless of management context type.
*
* @author Madhura Bhave
*/
@Configuration
class JerseyManagementContextConfiguration {
@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.
@@ -45,6 +45,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import static org.assertj.core.api.Assertions.assertThat;
@@ -127,6 +128,7 @@ public class JerseyServerMetricsAutoConfigurationTests {
String.class);
}
@Configuration
static class ResourceConfiguration {
@Bean
@@ -147,6 +149,7 @@ public class JerseyServerMetricsAutoConfigurationTests {
}
@Configuration
static class CustomJerseyTagsProviderConfiguration {
@Bean

View File

@@ -24,6 +24,7 @@ import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import static org.assertj.core.api.Assertions.assertThat;
@@ -69,6 +70,7 @@ public class ScheduledTasksEndpointAutoConfigurationTests {
.hasBean("customEndpoint"));
}
@Configuration
private static class CustomEndpointConfiguration {
@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.
@@ -96,6 +96,7 @@ public abstract class AbstractEndpointRequestIntegrationTests {
return "Basic " + Base64.getEncoder().encodeToString("user:password".getBytes());
}
@Configuration
static class BaseConfiguration {
@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.
@@ -22,6 +22,7 @@ import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.filter.RequestContextFilter;
@@ -72,6 +73,7 @@ public class WebMvcEndpointChildContextConfigurationTests {
.isEqualTo("/"));
}
@Configuration
static class ExistingConfig {
@Bean
@@ -81,6 +83,7 @@ public class WebMvcEndpointChildContextConfigurationTests {
}
@Configuration
static class RequestContextListenerConfig {
@Bean