Merge branch '2.7.x' into 3.0.x
Closes gh-34781
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.cassandra;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -31,10 +30,9 @@ class DataCassandraTestContextBootstrapper extends SpringBootTestContextBootstra
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataCassandraTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataCassandraTest dataCassandraTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||
DataCassandraTest.class);
|
||||
return (dataCassandraTest != null) ? dataCassandraTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.couchbase;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -31,10 +30,9 @@ class DataCouchbaseTestContextBootstrapper extends SpringBootTestContextBootstra
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataCouchbaseTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataCouchbaseTest dataCouchbaseTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||
DataCouchbaseTest.class);
|
||||
return (dataCouchbaseTest != null) ? dataCouchbaseTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.elasticsearch;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -31,10 +30,9 @@ class DataElasticsearchTestContextBootstrapper extends SpringBootTestContextBoot
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataElasticsearchTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataElasticsearchTest dataElasticsearchTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||
DataElasticsearchTest.class);
|
||||
return (dataElasticsearchTest != null) ? dataElasticsearchTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.jdbc;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class DataJdbcTestContextBootstrapper extends SpringBootTestContextBootstrapper
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataJdbcTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataJdbcTest dataJdbcTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, DataJdbcTest.class);
|
||||
return (dataJdbcTest != null) ? dataJdbcTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.ldap;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class DataLdapTestContextBootstrapper extends SpringBootTestContextBootstrapper
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataLdapTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataLdapTest dataLdapTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, DataLdapTest.class);
|
||||
return (dataLdapTest != null) ? dataLdapTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.mongo;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class DataMongoTestContextBootstrapper extends SpringBootTestContextBootstrapper
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataMongoTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataMongoTest dataMongoTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, DataMongoTest.class);
|
||||
return (dataMongoTest != null) ? dataMongoTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.neo4j;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class DataNeo4jTestContextBootstrapper extends SpringBootTestContextBootstrapper
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataNeo4jTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataNeo4jTest dataNeo4jTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, DataNeo4jTest.class);
|
||||
return (dataNeo4jTest != null) ? dataNeo4jTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.r2dbc;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class DataR2dbcTestContextBootstrapper extends SpringBootTestContextBootstrapper
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataR2dbcTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataR2dbcTest dataR2dbcTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, DataR2dbcTest.class);
|
||||
return (dataR2dbcTest != null) ? dataR2dbcTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.data.redis;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class DataRedisTestContextBootstrapper extends SpringBootTestContextBootstrapper
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(DataRedisTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
DataRedisTest dataRedisTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, DataRedisTest.class);
|
||||
return (dataRedisTest != null) ? dataRedisTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.graphql;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -29,10 +29,8 @@ class GraphQlTestContextBootstrapper extends SpringBootTestContextBootstrapper {
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, MergedAnnotations.SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(GraphQlTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
GraphQlTest graphQlTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, GraphQlTest.class);
|
||||
return (graphQlTest != null) ? graphQlTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.jdbc;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class JdbcTestContextBootstrapper extends SpringBootTestContextBootstrapper {
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(JdbcTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
JdbcTest jdbcTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, JdbcTest.class);
|
||||
return (jdbcTest != null) ? jdbcTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.jooq;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class JooqTestContextBootstrapper extends SpringBootTestContextBootstrapper {
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(JooqTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
JooqTest jooqTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, JooqTest.class);
|
||||
return (jooqTest != null) ? jooqTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.json;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,8 @@ class JsonTestContextBootstrapper extends SpringBootTestContextBootstrapper {
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(JsonTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
JsonTest jsonTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, JsonTest.class);
|
||||
return (jsonTest != null) ? jsonTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.web.client;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -30,10 +29,9 @@ class RestClientTestContextBootstrapper extends SpringBootTestContextBootstrappe
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(RestClientTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
RestClientTest restClientTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||
RestClientTest.class);
|
||||
return (restClientTest != null) ? restClientTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,9 +18,8 @@ package org.springframework.boot.test.autoconfigure.web.reactive;
|
||||
|
||||
import org.springframework.boot.test.context.ReactiveWebMergedContextConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.MergedContextConfiguration;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -38,10 +37,8 @@ class WebFluxTestContextBootstrapper extends SpringBootTestContextBootstrapper {
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(WebFluxTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
WebFluxTest webFluxTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, WebFluxTest.class);
|
||||
return (webFluxTest != null) ? webFluxTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
package org.springframework.boot.test.autoconfigure.web.servlet;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.MergedContextConfiguration;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
import org.springframework.test.context.web.WebMergedContextConfiguration;
|
||||
|
||||
@@ -40,10 +39,8 @@ class WebMvcTestContextBootstrapper extends SpringBootTestContextBootstrapper {
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(WebMvcTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
WebMvcTest webMvcTest = TestContextAnnotationUtils.findMergedAnnotation(testClass, WebMvcTest.class);
|
||||
return (webMvcTest != null) ? webMvcTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
package org.springframework.boot.test.autoconfigure.webservices.client;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
|
||||
/**
|
||||
@@ -31,10 +30,9 @@ class WebServiceClientTestContextBootstrapper extends SpringBootTestContextBoots
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(WebServiceClientTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
WebServiceClientTest webServiceClientTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||
WebServiceClientTest.class);
|
||||
return (webServiceClientTest != null) ? webServiceClientTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
package org.springframework.boot.test.autoconfigure.webservices.server;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
|
||||
import org.springframework.core.annotation.MergedAnnotations;
|
||||
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||
import org.springframework.test.context.MergedContextConfiguration;
|
||||
import org.springframework.test.context.TestContextAnnotationUtils;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
import org.springframework.test.context.web.WebMergedContextConfiguration;
|
||||
|
||||
@@ -39,10 +38,9 @@ class WebServiceServerTestContextBootstrapper extends SpringBootTestContextBoots
|
||||
|
||||
@Override
|
||||
protected String[] getProperties(Class<?> testClass) {
|
||||
return MergedAnnotations.from(testClass, SearchStrategy.INHERITED_ANNOTATIONS)
|
||||
.get(WebServiceServerTest.class)
|
||||
.getValue("properties", String[].class)
|
||||
.orElse(null);
|
||||
WebServiceServerTest webServiceServerTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
|
||||
WebServiceServerTest.class);
|
||||
return (webServiceServerTest != null) ? webServiceServerTest.properties() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user