spring-boot/spring-boot-project/spring-boot-docs
Stéphane Nicoll b3f35baed3 Add metadata support for types in arbitrary modules
Previously, if a ConfigurationProperties had a nested type or was
extending from a type located outside the compilation unit, no
metadata discovered on the source code was available (documentation and
explicit default value, if any). This typically happens when such a type
resides in another module.

This commit introduces `@ConfigurationPropertiesSource` as a way to
annotate such type and have metadata generated for them in their own
module.

Type-metadata is generated as one file per type and is reused
transparently whenever that type is used. As for module metadata, an
additional file can be crafted manually and will be merged when the
metadata for the type is generated.

The following is an example structure with two types where one has
an additional metadata:

META-iNF/
  spring/
    configuration-properties/
      additional/
        com.example.SourceOne.json
      com.example.SourceOne.json
      com.example.SourceTwo.json

Those files are used only by the annotation processor and are not meant
to be public API.

See gh-18366
2025-05-13 13:42:55 +02:00
..
src Add metadata support for types in arbitrary modules 2025-05-13 13:42:55 +02:00
build.gradle Replace spring-jcl with vanilla commons-logging 2025-05-09 17:38:11 -07:00