Merge branch '2.0.x' into 2.1.x
This commit is contained in:
@@ -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.
|
||||
@@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.jdbc.DatabaseDriver;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -46,6 +47,7 @@ abstract class DataSourceConfiguration {
|
||||
/**
|
||||
* Tomcat Pool DataSource configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(org.apache.tomcat.jdbc.pool.DataSource.class)
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.tomcat.jdbc.pool.DataSource", matchIfMissing = true)
|
||||
@@ -72,6 +74,7 @@ abstract class DataSourceConfiguration {
|
||||
/**
|
||||
* Hikari DataSource configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(HikariDataSource.class)
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "com.zaxxer.hikari.HikariDataSource", matchIfMissing = true)
|
||||
@@ -93,6 +96,7 @@ abstract class DataSourceConfiguration {
|
||||
/**
|
||||
* DBCP DataSource configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(org.apache.commons.dbcp2.BasicDataSource.class)
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.commons.dbcp2.BasicDataSource", matchIfMissing = true)
|
||||
@@ -111,6 +115,7 @@ abstract class DataSourceConfiguration {
|
||||
/**
|
||||
* Generic DataSource configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type")
|
||||
static class Generic {
|
||||
|
||||
@@ -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.
|
||||
@@ -95,6 +95,7 @@ abstract class ReactiveWebServerFactoryConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean(ReactiveWebServerFactory.class)
|
||||
@ConditionalOnClass({ Undertow.class })
|
||||
static class EmbeddedUndertow {
|
||||
|
||||
@@ -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.
|
||||
@@ -307,6 +307,7 @@ public class BatchAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableBatchProcessing
|
||||
protected static class NamedJobConfigurationWithRegisteredJob {
|
||||
|
||||
@@ -348,6 +349,7 @@ public class BatchAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableBatchProcessing
|
||||
protected static class NamedJobConfigurationWithLocalJob {
|
||||
|
||||
@@ -379,6 +381,7 @@ public class BatchAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableBatchProcessing
|
||||
protected static class JobConfiguration {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -32,6 +32,7 @@ import org.springframework.boot.autoconfigure.jndi.TestableInitialContextFactory
|
||||
import org.springframework.boot.test.util.TestPropertyValues;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jmx.export.MBeanExporter;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
@@ -161,7 +162,8 @@ public class JndiDataSourceAutoConfigurationTests {
|
||||
TestableInitialContextFactory.bind(name, dataSource);
|
||||
}
|
||||
|
||||
private static class MBeanExporterConfiguration {
|
||||
@Configuration
|
||||
static class MBeanExporterConfiguration {
|
||||
|
||||
@Bean
|
||||
MBeanExporter mbeanExporter() {
|
||||
@@ -170,7 +172,8 @@ public class JndiDataSourceAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
private static class AnotherMBeanExporterConfiguration {
|
||||
@Configuration
|
||||
static class AnotherMBeanExporterConfiguration {
|
||||
|
||||
@Bean
|
||||
MBeanExporter anotherMbeanExporter() {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -111,6 +111,7 @@ public class MongoAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class FallbackMongoClientConfig {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -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.
|
||||
@@ -382,6 +382,7 @@ public class MultipartAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
public static class WebServerWithCustomMultipartResolver {
|
||||
|
||||
@Bean
|
||||
@@ -391,6 +392,7 @@ public class MultipartAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
public static class ContainerWithCommonsMultipartResolver {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -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.
|
||||
@@ -75,6 +75,7 @@ public class WebSocketServletAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class CommonConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user