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
This commit moves PortInUseFailureAnalyzer to o.s.b.web.server as its
current location means the whole general failure analyzer package has
to know about web servers.
Closes gh-45524
Add auto-configuration support for Spring Framework's HTTP Service
clients, supporting both `RestClient` and `WebClient` client types.
Configuration properties are provided under `spring.http.client.service`
and `spring.http.reactiveclient.service` names. Group specific
properties are available under `....service.group.<name>.`.
Auto-configuration support includes automatic registration of user
defined `HttpServiceGroupConfigurer` beans. `RestClientCustomizer` and
`WebClientCustomizer` beans are also supported.
Closes gh-31337
Co-authored-by: Rossen Stoyanchev <rossen.stoyanchev@broadcom.com>
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
Replace hint API calls with updated version and fix tests that
relied on previous JSON files.
See gh-45487
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
For some reason metrics are not always being recorded before the check
runs when a full build is running. Adding a sleep seems to "solve" the
problem.
See gh-45483
See gh-45404
This commit upgrades to Kotlin 2.1.0. Two related dependencies have been
updated as well: Kotlin Coroutines to 1.10, and Kotlin Serialization to
1.8.
As of Kotlin 2, it is no longer possible to have a Java type and a
Kotlin type with the same name. As our code samples follow that
unfortunate pattern, this commit makes sure that the Kotlin sample code
does not depend on any of the Java counterpart and configure the kotlin
compilation plugin to ignore Java sources.
The minimum version of Gradle is 7.6.4. It bundles a version of Kotlin
that cannot compile a Kotlin build script when spring-core, compiled
with Kotlin 2.1, is on the classpath. Using Gradle 8.12 to run the DSL
tests avoids the problem.
Closes gh-45486
Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com>