Recreate proxied @ConfigurationProperties beans on rebind by seonghyeoklee · Pull Request #1662 · spring-cloud/spring-cloud-commons (original) (raw)

@seonghyeoklee

When a @ConfigurationProperties bean is wrapped in an AOP proxy, recreate the target instance via createBean() instead of re-initializing the existing one. This ensures field initializers are restored when properties are removed from the Environment.

Fixes spring-cloudgh-1616

Signed-off-by: seonghyeoklee dltjdgur327@gmail.com

@ryanjbaxter

@seonghyeoklee @seonghyeok-lee

Signed-off-by: seonghyeoklee dltjdgur327@gmail.com

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})