Skip to content

Commit e69be7c

Browse files
committed
Merge branch '3.5.x'
Closes gh-48569
2 parents d489aa6 + 15ede46 commit e69be7c

File tree

9 files changed

+87
-5
lines changed

9 files changed

+87
-5
lines changed

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfiguration.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@
7878

7979
/**
8080
* The auto-configuration classes that should have not yet been applied.
81+
* <p>
82+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
83+
* classes here that may ultimately not be on the classpath, only if this annotation
84+
* is directly on the affected component and <b>not</b> if this annotation is used as
85+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
86+
* only use the {@link #beforeName} attribute.
8187
* @return the classes
8288
*/
8389
@AliasFor(annotation = AutoConfigureBefore.class, attribute = "value")
@@ -95,6 +101,12 @@
95101

96102
/**
97103
* The auto-configuration classes that should have already been applied.
104+
* <p>
105+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
106+
* classes here that may ultimately not be on the classpath, only if this annotation
107+
* is directly on the affected component and <b>not</b> if this annotation is used as
108+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
109+
* only use the {@link #afterName} attribute.
98110
* @return the classes
99111
*/
100112
@AliasFor(annotation = AutoConfigureAfter.class, attribute = "value")

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureAfter.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545

4646
/**
4747
* The auto-configuration classes that should have already been applied.
48+
* <p>
49+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
50+
* classes here that may ultimately not be on the classpath, only if this annotation
51+
* is directly on the affected component and <b>not</b> if this annotation is used as
52+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
53+
* only use the {@link #name} attribute.
4854
* @return the classes
4955
*/
5056
Class<?>[] value() default {};

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureBefore.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545

4646
/**
4747
* The auto-configuration classes that should have not yet been applied.
48+
* <p>
49+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
50+
* classes here that may ultimately not be on the classpath, only if this annotation
51+
* is directly on the affected component and <b>not</b> if this annotation is used as
52+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
53+
* only use the {@link #name} attribute.
4854
* @return the classes
4955
*/
5056
Class<?>[] value() default {};

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@
8585

8686
/**
8787
* Exclude specific auto-configuration classes such that they will never be applied.
88+
* <p>
89+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
90+
* classes here that may ultimately not be on the classpath, only if this annotation
91+
* is directly on the affected component and <b>not</b> if this annotation is used as
92+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
93+
* only use the {@link #excludeName()} attribute.
8894
* @return the classes to exclude
8995
*/
9096
Class<?>[] exclude() default {};

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/SpringBootApplication.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959

6060
/**
6161
* Exclude specific auto-configuration classes such that they will never be applied.
62+
* <p>
63+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
64+
* classes here that may ultimately not be on the classpath, only if this annotation
65+
* is directly on the affected component and <b>not</b> if this annotation is used as
66+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
67+
* only use the {@link #excludeName} attribute.
6268
* @return the classes to exclude
6369
*/
6470
@AliasFor(annotation = EnableAutoConfiguration.class)

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBean.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@
7272
* The class types of beans that should be checked. The condition matches when beans
7373
* of all classes specified are contained in the {@link BeanFactory}. Beans that are
7474
* not autowire candidates or that are not default candidates are ignored.
75+
* <p>
76+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
77+
* classes here that may ultimately not be on the classpath, only if this annotation
78+
* is directly on the affected component and <b>not</b> if this annotation is used as
79+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
80+
* only use the {@link #type} attribute.
7581
* @return the class types of beans to check
7682
* @see Bean#autowireCandidate()
7783
* @see BeanDefinition#isAutowireCandidate
@@ -97,6 +103,11 @@
97103
* when all the annotations specified are defined on beans in the {@link BeanFactory}.
98104
* Beans that are not autowire candidates or that are not default candidates are
99105
* ignored.
106+
* <p>
107+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
108+
* classes here that may ultimately not be on the classpath, only if this annotation
109+
* is directly on the affected component and <b>not</b> if this annotation is used as
110+
* a composed, meta-annotation.
100111
* @return the class-level annotation types to check
101112
* @see Bean#autowireCandidate()
102113
* @see BeanDefinition#isAutowireCandidate
@@ -124,6 +135,11 @@
124135
* parameters. For example, an annotation declaring {@code value=Name.class} and
125136
* {@code parameterizedContainer=NameRegistration.class} would detect both
126137
* {@code Name} and {@code NameRegistration<Name>}.
138+
* <p>
139+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
140+
* classes here that may ultimately not be on the classpath, only if this annotation
141+
* is directly on the affected component and <b>not</b> if this annotation is used as
142+
* a composed, meta-annotation.
127143
* @return the container types
128144
* @since 2.1.0
129145
*/

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnClass.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@
6666
public @interface ConditionalOnClass {
6767

6868
/**
69-
* The classes that must be present. Since this annotation is parsed by loading class
70-
* bytecode, it is safe to specify classes here that may ultimately not be on the
71-
* classpath, only if this annotation is directly on the affected component and
72-
* <b>not</b> if this annotation is used as a composed, meta-annotation. In order to
73-
* use this annotation as a meta-annotation, only use the {@link #name} attribute.
69+
* The classes that must be present.
70+
* <p>
71+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
72+
* classes here that may ultimately not be on the classpath, only if this annotation
73+
* is directly on the affected component and <b>not</b> if this annotation is used as
74+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
75+
* only use the {@link #name} attribute.
7476
* @return the classes that must be present
7577
*/
7678
Class<?>[] value() default {};

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
* The class types of beans that should be checked. The condition matches when no bean
7474
* of each class specified is contained in the {@link BeanFactory}. Beans that are not
7575
* autowire candidates or that are not default candidates are ignored.
76+
* <p>
77+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
78+
* classes here that may ultimately not be on the classpath, only if this annotation
79+
* is directly on the affected component and <b>not</b> if this annotation is used as
80+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
81+
* only use the {@link #type} attribute.
7682
* @return the class types of beans to check
7783
* @see Bean#autowireCandidate()
7884
* @see BeanDefinition#isAutowireCandidate
@@ -95,6 +101,12 @@
95101

96102
/**
97103
* The class types of beans that should be ignored when identifying matching beans.
104+
* <p>
105+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
106+
* classes here that may ultimately not be on the classpath, only if this annotation
107+
* is directly on the affected component and <b>not</b> if this annotation is used as
108+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
109+
* only use the {@link #ignoredType} attribute.
98110
* @return the class types of beans to ignore
99111
* @since 1.2.5
100112
*/
@@ -113,6 +125,11 @@
113125
* when each annotation specified is missing from all beans in the
114126
* {@link BeanFactory}. Beans that are not autowire candidates or that are not default
115127
* candidates are ignored.
128+
* <p>
129+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
130+
* classes here that may ultimately not be on the classpath, only if this annotation
131+
* is directly on the affected component and <b>not</b> if this annotation is used as
132+
* a composed, meta-annotation.
116133
* @return the class-level annotation types to check
117134
* @see Bean#autowireCandidate()
118135
* @see BeanDefinition#isAutowireCandidate
@@ -140,6 +157,11 @@
140157
* parameters. For example, an annotation declaring {@code value=Name.class} and
141158
* {@code parameterizedContainer=NameRegistration.class} would detect both
142159
* {@code Name} and {@code NameRegistration<Name>}.
160+
* <p>
161+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
162+
* classes here that may ultimately not be on the classpath, only if this annotation
163+
* is directly on the affected component and <b>not</b> if this annotation is used as
164+
* a composed, meta-annotation.
143165
* @return the container types
144166
* @since 2.1.0
145167
*/

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidate.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@
5757
* exists in case of multiple instances. Beans that are not autowire candidates, that
5858
* are not default candidates, or that are fallback candidates are ignored.
5959
* <p>
60+
* Since this annotation is parsed by loading class bytecode, it is safe to specify
61+
* classes here that may ultimately not be on the classpath, only if this annotation
62+
* is directly on the affected component and <b>not</b> if this annotation is used as
63+
* a composed, meta-annotation. In order to use this annotation as a meta-annotation,
64+
* only use the {@link #type} attribute.
65+
* <p>
6066
* This attribute may <strong>not</strong> be used in conjunction with
6167
* {@link #type()}, but it may be used instead of {@link #type()}.
6268
* @return the class type of the bean to check

0 commit comments

Comments
 (0)