Update the `Binder` so that empty properties are treated as an indicator
that default value binding should be attempted. This update allow bound
objects to differentiate between a completely missing property vs one
that is present but doesn't have any values.
For example, given the following value object:
@ConfigurationProperties("my")
public record My(Name name, int age) {
public record Name(String first, String last) {
}
}
The following binding scenarios are supported:
1) Full binding
my.name.first=Spring
my.name.last=Boot
my.age=4
Binds to `new My(new Name("Spring", "Boot"), 4)`
(works the same as Spring Boot 4.0)
2) Missing Properties
my.age=4
Binds to `new My(null, 4)`
(works the same as Spring Boot 4.0)
3) Default Properties
my.name=
my.age=4
Binds to `new My(new Name(null, null), 4)`
(previously would throw a converter exception)
Closes gh-48920
- Add REVERSE (ANSI code 7) to AnsiStyle enum
- Expand ColorConverter ELEMENTS map to include all AnsiStyle values
(bold, italic, underline, normal, faint, reverse) and all AnsiBackground
colors with the bg_ prefix (bg_red, bg_bright_green, etc.)
- Update tests for both logback and log4j2 converters
See gh-49285
Signed-off-by: mvirole <virolemayank@gmail.com>
When running with Elasticsearch 9, the recently added test that
checks connectivity using SSL is flaky on CI. When the test fails,
it does so because Docker Compose reports that the container is
unhealthy when running docker compose up. One possibility is that
this is due to the container taking too long to reach a healthy
state. This commit attempts to confirm that theory and hopefully
address the problem by configuring a wait timeout of 120 seconds
for the up command.
See gh-49385
Add `FailureAnalyzedException` to reduce the number of internal
`FailureAnalizers` required when only a simple "description" and
"action" are required.
Closes gh-49320
Update `ValueObjectBinder` so that `Optional` parameters are bound as
`Option.empty()` rather than `null`.
See gh-49152
Signed-off-by: Ondřej Světlík <16480390+osvetlik@users.noreply.github.com>
In the brackets we can now specify the encoding of the file instead of
only the file extension:
spring.config.import=classpath:import.properties[encoding=utf-8]
The old format
spring.config.import=classpath:import[.properties]
is still supported and is a shorthand for:
spring.config.import=classpath:import[extension=.properties]
Attributes can be combined, too:
spring.config.import=classpath:import[extension=.properties][encoding=utf-8]
Closes gh-28663
This commit removes support for the following properties that are
deprecated since Spring Boot 2.4:
- logging.pattern.rolling-file-name
- logging.file.clean-history-on-start
- logging.file.max-size
- logging.file.total-size-cap
- logging.file.max-history
Closes gh-48489
This commit introduces a failure analyzer implementation that provides
actionable guidance when Testcontainers fails to detect a running
Docker-compatible environment.
See gh-47797
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Explicitly nullify `ParameterNameDiscovery` to simulate code that has
not been compiled with `-parameters`. Previously we were relying on an
initialization behavior that could change and break those tests.