I tried both ways how to use nested records as configuration properties. In non of them validation works. I have in the same project configuration with just one record without nesting and that works.
Examples
@Validated
@ConfigurationProperties(prefix = "client")
public record ClientProperties(@NestedConfigurationProperty ServiceOne serviceOne) {
}
@Validated
record ServiceOne(@NotBlank String url, @Email String email) {
}
@Validated
@ConfigurationProperties(prefix = "client")
public record ClientProperties(ServiceOne serviceOne) {
@Validated
public record ServiceOne(@NotBlank String url, @Email String email) {
}
}