Test for AOP proxy generally, not just CGlib

Fixes gh-288, closes gh-289
This commit is contained in:
Dave Syer
2017-12-15 16:19:48 +00:00
parent c5382ccfd6
commit 8a0261f275

View File

@@ -93,7 +93,7 @@ public class ConfigurationPropertiesRebinder
if (this.applicationContext != null) {
try {
Object bean = this.applicationContext.getBean(name);
if (AopUtils.isCglibProxy(bean)) {
if (AopUtils.isAopProxy(bean)) {
bean = getTargetObject(bean);
}
this.applicationContext.getAutowireCapableBeanFactory().destroyBean(bean);