diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java index d430540ab2f..b5bb8fe7c6d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AllNestedConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. @@ -28,16 +28,24 @@ import org.springframework.context.annotation.Condition; *
* static class OnJndiAndProperty extends AllNestedConditions {
*
+ * OnJndiAndProperty() {
+ * super(ConfigurationPhase.PARSE_CONFIGURATION);
+ * }
+ *
* @ConditionalOnJndi()
* static class OnJndi {
* }
-
+ *
* @ConditionalOnProperty("something")
* static class OnProperty {
* }
*
* }
*
+ * + * The {@link ConfigurationPhase} should be specified according to the conditions that + * are defined. In the example above, all conditions are static and can be evaluated + * early so {@code PARSE_CONFIGURATION} is a right fit. * * @author Phillip Webb * @since 1.3.0 diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java index eea34624248..462bed55b1f 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/AnyNestedCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. @@ -30,16 +30,24 @@ import org.springframework.core.annotation.Order; *
* static class OnJndiOrProperty extends AnyNestedCondition {
*
+ * OnJndiOrProperty() {
+ * super(ConfigurationPhase.PARSE_CONFIGURATION);
+ * }
+ *
* @ConditionalOnJndi()
* static class OnJndi {
* }
-
+ *
* @ConditionalOnProperty("something")
* static class OnProperty {
* }
*
* }
*
+ * + * The {@link ConfigurationPhase} should be specified according to the conditions that + * are defined. In the example above, all conditions are static and can be evaluated + * early so {@code PARSE_CONFIGURATION} is a right fit. * * @author Phillip Webb * @since 1.2.0 diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java index 9bbe3f5f50d..2a164b74d15 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/NoneNestedConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. @@ -28,16 +28,24 @@ import org.springframework.context.annotation.Condition; *
* static class OnNeitherJndiNorProperty extends NoneOfNestedConditions {
*
+ * OnNeitherJndiNorProperty() {
+ * super(ConfigurationPhase.PARSE_CONFIGURATION);
+ * }
+ *
* @ConditionalOnJndi()
* static class OnJndi {
* }
-
+ *
* @ConditionalOnProperty("something")
* static class OnProperty {
* }
*
* }
*
+ * + * The {@link ConfigurationPhase} should be specified according to the conditions that + * are defined. In the example above, all conditions are static and can be evaluated + * early so {@code PARSE_CONFIGURATION} is a right fit. * * @author Phillip Webb * @since 1.3.0