diff --git a/spring-context/src/main/java/org/springframework/context/annotation/PropertySource.java b/spring-context/src/main/java/org/springframework/context/annotation/PropertySource.java index 2dc039b94034..a112a3c9e43b 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/PropertySource.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/PropertySource.java @@ -171,11 +171,28 @@ public @interface PropertySource { /** - * Indicate the name of this property source. If omitted, the {@link #factory} - * will generate a name based on the underlying resource (in the case of - * {@link org.springframework.core.io.support.DefaultPropertySourceFactory}: - * derived from the resource description through a corresponding name-less - * {@link org.springframework.core.io.support.ResourcePropertySource} constructor). + * Indicate the unique name of this property source. + *

If omitted, the {@link #factory} will generate a name based on the + * underlying resource (in the case of + * {@link org.springframework.core.io.support.DefaultPropertySourceFactory + * DefaultPropertySourceFactory}: derived from the resource description through + * a corresponding name-less + * {@link org.springframework.core.io.support.ResourcePropertySource + * ResourcePropertySource} constructor). + *

The name of a {@code PropertySource} serves two general purposes. + *

* @see org.springframework.core.env.PropertySource#getName() * @see org.springframework.core.io.Resource#getDescription() */