diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Commit.java b/spring-test/src/main/java/org/springframework/test/annotation/Commit.java index dae764b1f01..9e881a5de4d 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/Commit.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/Commit.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2020 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. @@ -44,6 +44,11 @@ import java.lang.annotation.Target; * {@code @Commit} and {@code @Rollback} on the same test method or on the * same test class is unsupported and may lead to unpredictable results. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} + * for details. + * * @author Sam Brannen * @since 4.2 * @see Rollback diff --git a/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java b/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java index 78f884b0b92..9441c9133d3 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -43,6 +43,11 @@ import java.lang.annotation.Target; *
This annotation may be used as a meta-annotation to create custom * composed annotations. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} + * for details. + * *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} + * for details. + * * @author Sam Brannen * @since 2.5 * @see Commit diff --git a/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java b/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java index 9ad1e3068aa..0bc4a2987d0 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java +++ b/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -34,6 +34,10 @@ import org.springframework.core.annotation.AliasFor; *
This annotation may be used as a meta-annotation to create custom * composed annotations. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Sam Brannen * @since 3.1 * @see SmartContextLoader diff --git a/spring-test/src/main/java/org/springframework/test/context/BootstrapWith.java b/spring-test/src/main/java/org/springframework/test/context/BootstrapWith.java index d85427a54ce..1a00c818d45 100644 --- a/spring-test/src/main/java/org/springframework/test/context/BootstrapWith.java +++ b/spring-test/src/main/java/org/springframework/test/context/BootstrapWith.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 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. @@ -33,6 +33,10 @@ import java.lang.annotation.Target; * present on the current test class) will override any meta-present * declarations of {@code @BootstrapWith}. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Sam Brannen * @since 4.1 * @see BootstrapContext diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java index e90c8d9be24..9eaabcb4f03 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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,10 @@ import org.springframework.core.annotation.AliasFor; *
This annotation may be used as a meta-annotation to create custom * composed annotations. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Sam Brannen * @since 2.5 * @see org.springframework.test.context.junit.jupiter.SpringJUnitConfig @SpringJUnitConfig diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextHierarchy.java b/spring-test/src/main/java/org/springframework/test/context/ContextHierarchy.java index 1e49e9f1739..f4cee11b4b8 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextHierarchy.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextHierarchy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -134,6 +134,10 @@ import java.lang.annotation.Target; *
This annotation may be used as a meta-annotation to create custom * composed annotations. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Sam Brannen * @since 3.2.2 * @see ContextConfiguration diff --git a/spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java index 8071d85a942..a1e3db386a7 100644 --- a/spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java @@ -60,14 +60,28 @@ import org.springframework.lang.Nullable; * classes in JUnit Jupiter; however, there may be other testing frameworks with * support for nested test classes that could also make use of this annotation. * + *
The Spring TestContext Framework honors {@code @NestedTestConfiguration} + * semantics for the following annotations. + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Sam Brannen * @since 5.2 * @see org.springframework.beans.factory.annotation.Autowired @Autowired diff --git a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java index 4056cadeaa6..b1b38149d1d 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -36,6 +36,10 @@ import org.springframework.core.annotation.AliasFor; *
This annotation may be used as a meta-annotation to create custom * composed annotations. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Sam Brannen * @since 2.5 * @see TestExecutionListener diff --git a/spring-test/src/main/java/org/springframework/test/context/TestPropertySource.java b/spring-test/src/main/java/org/springframework/test/context/TestPropertySource.java index 6315da3851b..f74b9c5c626 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestPropertySource.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestPropertySource.java @@ -78,6 +78,9 @@ import org.springframework.core.annotation.AliasFor; * annotation since the {@code locations} and {@code inheritLocations} attributes * of both annotations can lead to ambiguity during the attribute resolution * process.
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link NestedTestConfiguration @NestedTestConfiguration} for details. + * * @author Anatoliy Korovin * @author Sam Brannen * @since 5.2 diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java index 4df60f17755..7b5e4520b1c 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -41,6 +41,11 @@ import java.lang.annotation.Target; *
This annotation may be used as a meta-annotation to create custom * composed annotations. * + *
As of Spring Framework 5.3, this annotation will be inherited from an + * enclosing test class by default. See + * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} + * for details. + * * @author Sam Brannen * @since 3.2 * @see org.springframework.web.context.WebApplicationContext