Files
spring-boot/spring-boot-project
Andy Wilkinson b240c810a8 Fix @ConfigurationProperties on @Bean methods without metadata caching
Due to a current limitation of Spring Framework, when bean metadata
caching is disabled, a merged bean definition may have a null
resolved factory method that would have been non-null if bean metadata
caching was enabled. Configuration property binding for @Bean methods
annotated with @ConfigurationProperties relied upon the resolved
factory method being enabled to find the @ConfigurationProperties
annotation and trigger property binding. As a result, when bean
metadata caching is disabled on the bean factory, such
@ConfigurationProperties beans would not be bound.

This commit works around the limitation by adding a fallback that
performs a reflection-based search for the factory method when the
resolved factory method on the bean definition is null. This allows
the bean's factory method and any @ConfigurationProperties annotation
on it to be found, ensuring that propoerty binding is then performed.

Fixes gh-18440
2019-10-15 11:21:53 +01:00
..
2019-10-15 08:15:42 +02:00
2019-10-02 22:15:05 -07:00
2019-10-08 14:11:50 -05:00
2019-10-08 07:38:21 -05:00
2019-10-02 10:48:57 +01:00