[SPR-8541] Documented DelegatingSmartContextLoader.

master
Sam Brannen 13 years ago
parent 466c3b4b2a
commit 8ccedd452e
  1. 16
      org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java

@ -22,7 +22,6 @@ import java.util.List;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.ContextConfigurationAttributes; import org.springframework.test.context.ContextConfigurationAttributes;
import org.springframework.test.context.ContextLoader; import org.springframework.test.context.ContextLoader;
@ -42,13 +41,14 @@ import org.springframework.util.ObjectUtils;
* that supports the merged, processed configuration will be used to actually * that supports the merged, processed configuration will be used to actually
* {@link #loadContext load} the context. * {@link #loadContext load} the context.
* *
* <p>Placing an empty {@code @ContextConfiguration} annotation on * <p>Placing an empty {@code @ContextConfiguration} annotation on a test class signals
* a test class signals that default resource locations (i.e., XML configuration files) * that default resource locations (i.e., XML configuration files) or default
* or default {@link Configuration configuration classes} should be detected. Furthermore, * {@link org.springframework.context.annotation.Configuration configuration classes}
* if a specific {@link ContextLoader} or {@link SmartContextLoader} is not explicitly * should be detected. Furthermore, if a specific {@link ContextLoader} or
* declared via {@code @ContextConfiguration}, {@code DelegatingSmartContextLoader} will * {@link SmartContextLoader} is not explicitly declared via
* be used as the default loader, thus providing automatic support for either XML * {@code @ContextConfiguration}, {@code DelegatingSmartContextLoader} will be used as
* configuration files or configuration classes, but not both simultaneously. * the default loader, thus providing automatic support for either XML configuration
* files or configuration classes, but not both simultaneously.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 3.1 * @since 3.1

Loading…
Cancel
Save