Update documentation regarding repeatable @PropertySource support

See gh-30941
This commit is contained in:
Sam Brannen 2023-08-16 11:37:12 +02:00
parent 701c39a325
commit d81ddcef34
1 changed files with 3 additions and 5 deletions

View File

@ -771,11 +771,9 @@ resolved to the corresponding value. If not, then `default/path` is used
as a default. If no default is specified and a property cannot be resolved, an
`IllegalArgumentException` is thrown.
NOTE: The `@PropertySource` annotation is repeatable, according to Java 8 conventions.
However, all such `@PropertySource` annotations need to be declared at the same
level, either directly on the configuration class or as meta-annotations within the
same custom annotation. Mixing direct annotations and meta-annotations is not
recommended, since direct annotations effectively override meta-annotations.
NOTE: `@PropertySource` can be used as a repeatable annotation. `@PropertySource`
may also be used as a meta-annotation to create custom composed annotations with
attribute overrides.