提交 81844191 编写于 作者: S Sam Brannen

Polish Javadoc for @ImportResource

上级 4dffeeee
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 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.
......@@ -29,19 +29,20 @@ import org.springframework.beans.factory.support.BeanDefinitionReader;
*
* <p>Like {@link Import @Import}, this annotation provides functionality similar to
* the {@code <import/>} element in Spring XML. It is typically used when designing
* {@link Configuration @Configuration} classes to be bootstrapped by
* {@link Configuration @Configuration} classes to be bootstrapped by an
* {@link AnnotationConfigApplicationContext}, but where some XML functionality such
* as namespaces is still necessary.
*
* <p>By default, arguments to the {@link #value()} attribute will be processed using
* <p>By default, arguments to the {@link #value} attribute will be processed using a
* {@link org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader} if ending in
* ".groovy"; otherwise, {@link org.springframework.beans.factory.xml.XmlBeanDefinitionReader}
* will be used to parse Spring {@code <beans/>} XML files. Optionally, the {@link #reader()}
* attribute may be supplied, allowing the user to choose a custom {@link BeanDefinitionReader}
* {@code ".groovy"}; otherwise, an {@link org.springframework.beans.factory.xml.XmlBeanDefinitionReader}
* will be used to parse Spring {@code <beans/>} XML files. Optionally, the {@link #reader}
* attribute may be declared, allowing the user to choose a custom {@link BeanDefinitionReader}
* implementation.
*
* @author Chris Beams
* @author Juergen Hoeller
* @author Sam Brannen
* @since 3.0
* @see Configuration
* @see Import
......@@ -52,21 +53,24 @@ import org.springframework.beans.factory.support.BeanDefinitionReader;
public @interface ImportResource {
/**
* Resource paths to import. Resource-loading prefixes such as {@code classpath:}
* and {@code file:}, etc may be used.
* <p>Out of the box, ".groovy" files are going to be specifically parsed with
* {@link org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader};
* others with {@link org.springframework.beans.factory.xml.XmlBeanDefinitionReader}.
* Resource locations from which to import.
* <p>Supports resource-loading prefixes such as {@code classpath:}, {@code file:},
* etc.
* <p>Consult the Javadoc for {@link #reader} for details on how resources
* will be processed.
* @see #reader
*/
String[] value();
/**
* {@link BeanDefinitionReader} implementation to use when processing resources
* specified by the {@link #value()} attribute.
* specified via the {@link #value} attribute.
* <p>By default, the reader will be adapted to the resource path specified:
* ".groovy" files are going to be specifically parsed with
* {@code ".groovy"} files will be processed with a
* {@link org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader};
* others with {@link org.springframework.beans.factory.xml.XmlBeanDefinitionReader}.
* whereas, all other resources will be processed with an
* {@link org.springframework.beans.factory.xml.XmlBeanDefinitionReader}.
* @see #value
*/
Class<? extends BeanDefinitionReader> reader() default BeanDefinitionReader.class;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册