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 d8f6bd4a9c..eebbceb0db 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 @@ -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 7cf9f0d781..1ebe3d1799 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 @@ -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 b6ebdfdb55..34c7f96b13 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 @@ -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