diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java index eadbbf05ad..7c6566fc8d 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java @@ -395,6 +395,7 @@ class ConfigurationClassBeanDefinitionReader { for (ConfigurationClass importedBy : configClass.getImportedBy()) { if (!shouldSkip(importedBy)) { allSkipped = false; + break; } } if (allSkipped) { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java index 641c50b62d..f652067f0c 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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. @@ -19,40 +19,40 @@ package org.springframework.context.annotation; /** * A {@link Condition} that offers more fine-grained control when used with * {@code @Configuration}. Allows certain {@link Condition}s to adapt when they match - * based on the configuration phase. For example, a condition that checks if a bean has - * already been registered might choose to only be evaluated during the + * based on the configuration phase. For example, a condition that checks if a bean + * has already been registered might choose to only be evaluated during the * {@link ConfigurationPhase#REGISTER_BEAN REGISTER_BEAN} {@link ConfigurationPhase}. * * @author Phillip Webb * @since 4.0 + * @see Configuration */ public interface ConfigurationCondition extends Condition { /** - * Returns the {@link ConfigurationPhase} in which the condition should be evaluated. + * Return the {@link ConfigurationPhase} in which the condition should be evaluated. */ ConfigurationPhase getConfigurationPhase(); + /** * The various configuration phases where the condition could be evaluated. */ public static enum ConfigurationPhase { /** - * The {@link Condition} should be evaluated as a {@code @Configuration} class is - * being parsed. - * - *

If the condition does not match at this point the {@code @Configuration} + * The {@link Condition} should be evaluated as a {@code @Configuration} + * class is being parsed. + *

If the condition does not match at this point, the {@code @Configuration} * class will not be added. */ PARSE_CONFIGURATION, /** - * The {@link Condition} should be evaluated when adding a regular (non - * {@code @Configuration}) bean. The condition will not prevent + * The {@link Condition} should be evaluated when adding a regular + * (non {@code @Configuration}) bean. The condition will not prevent * {@code @Configuration} classes from being added. - * - *

At the time that the condition is evaluated all {@code @Configuration}s + *

At the time that the condition is evaluated, all {@code @Configuration}s * will have been parsed. */ REGISTER_BEAN