• Phillip Webb's avatar
    Validate @ConfigurationProperties on @Bean methods · 1d83e87b
    Phillip Webb authored
    Refactor `ConfigurationPropertiesBindingPostProcessor` to allow JSR-303
    validation on `@ConfigurationProperties` defined at the `@Bean` method
    level.
    
    JSR-303 validation is now applied when a JSR-303 implementation is
    available and `@Validated` is present on either the configuration
    properties class itself or the `@Bean` method that creates it.
    
    Standard Spring validation is also supported using a validator bean
    named `configurationPropertiesValidator`, or by having the configuration
    properties implement `Validator`.
    
    The commit also consolidates tests into a single location.
    
    Fixes gh-10803
    1d83e87b
spring-boot-features.adoc 291 KB