Skip to content

Commit 8b6523a

Browse files
committed
Cross reference @⁠NestedTestConfiguration for Bean Overrides
1 parent e7f3493 commit 8b6523a

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 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.
@@ -82,6 +82,9 @@
8282
* <li>{@link ActiveProfiles @ActiveProfiles}</li>
8383
* <li>{@link TestPropertySource @TestPropertySource}</li>
8484
* <li>{@link DynamicPropertySource @DynamicPropertySource}</li>
85+
* <li>{@link org.springframework.test.context.bean.override.convention.TestBean @TestBean}</li>
86+
* <li>{@link org.springframework.test.context.bean.override.mockito.MockitoBean @MockitoBean}</li>
87+
* <li>{@link org.springframework.test.context.bean.override.mockito.MockitoSpyBean @MockitoSpyBean}</li>
8588
* <li>{@link org.springframework.test.annotation.DirtiesContext @DirtiesContext}</li>
8689
* <li>{@link org.springframework.transaction.annotation.Transactional @Transactional}</li>
8790
* <li>{@link org.springframework.test.annotation.Rollback @Rollback}</li>

spring-test/src/main/java/org/springframework/test/context/bean/override/convention/TestBean.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 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.
@@ -110,6 +110,10 @@
110110
* {@code protected}, package-private (default visibility), or {@code private}
111111
* depending on the needs or coding practices of the project.
112112
*
113+
* <p>{@code @TestBean} fields will be inherited from an enclosing test class by default. See
114+
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
115+
* for details.
116+
*
113117
* @author Simon Baslé
114118
* @author Stephane Nicoll
115119
* @author Sam Brannen

spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoBean.java

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
* (default visibility), or {@code private} depending on the needs or coding
6464
* practices of the project.
6565
*
66+
* <p>{@code @MockitoBean} fields will be inherited from an enclosing test class by default.
67+
* See {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
68+
* for details.
69+
*
6670
* @author Simon Baslé
6771
* @author Sam Brannen
6872
* @since 6.2

spring-test/src/main/java/org/springframework/test/context/bean/override/mockito/MockitoSpyBean.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 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.
@@ -56,6 +56,10 @@
5656
* (default visibility), or {@code private} depending on the needs or coding
5757
* practices of the project.
5858
*
59+
* <p>{@code @MockitoSpyBean} fields will be inherited from an enclosing test class by default.
60+
* See {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
61+
* for details.
62+
*
5963
* @author Simon Baslé
6064
* @author Sam Brannen
6165
* @since 6.2

0 commit comments

Comments
 (0)