File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
spring-context/src/main/java/org/springframework/context/annotation
spring-core/src/main/java/org/springframework/core/io/support Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
170
170
public @interface PropertySource {
171
171
172
172
/**
173
- * Indicate the name of this property source. If omitted, a name will
174
- * be generated based on the description of the underlying resource.
173
+ * Indicate the name of this property source. If omitted, the {@link #factory()}
174
+ * will generate a name based on the underlying resource (in the case of
175
+ * {@link org.springframework.core.io.support.DefaultPropertySourceFactory}:
176
+ * derived from the resource description through a corresponding name-less
177
+ * {@link org.springframework.core.io.support.ResourcePropertySource} constructor).
175
178
* @see org.springframework.core.env.PropertySource#getName()
176
179
* @see org.springframework.core.io.Resource#getDescription()
177
180
*/
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@ public interface PropertySourceFactory {
33
33
/**
34
34
* Create a {@link PropertySource} that wraps the given resource.
35
35
* @param name the name of the property source
36
+ * (can be {@code null} in which case the factory implementation
37
+ * will have to generate a name based on the given resource)
36
38
* @param resource the resource (potentially encoded) to wrap
37
39
* @return the new {@link PropertySource} (never {@code null})
38
40
* @throws IOException if resource resolution failed
You can’t perform that action at this time.
0 commit comments