Polish AutoProxyRegistrar
This commit is contained in:
@@ -21,10 +21,8 @@ import org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvi
|
|||||||
import org.springframework.cache.interceptor.CacheInterceptor;
|
import org.springframework.cache.interceptor.CacheInterceptor;
|
||||||
import org.springframework.cache.interceptor.CacheOperationSource;
|
import org.springframework.cache.interceptor.CacheOperationSource;
|
||||||
import org.springframework.context.annotation.AnnotationConfigUtils;
|
import org.springframework.context.annotation.AnnotationConfigUtils;
|
||||||
import org.springframework.context.annotation.AutoProxyRegistrar;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
|
||||||
import org.springframework.context.annotation.Role;
|
import org.springframework.context.annotation.Role;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public class AutoProxyRegistrar implements ImportBeanDefinitionRegistrar {
|
|||||||
AopConfigUtils.registerAutoProxyCreatorIfNecessary(registry);
|
AopConfigUtils.registerAutoProxyCreatorIfNecessary(registry);
|
||||||
if ((Boolean)proxyTargetClass) {
|
if ((Boolean)proxyTargetClass) {
|
||||||
AopConfigUtils.forceAutoProxyCreatorToUseClassProxying(registry);
|
AopConfigUtils.forceAutoProxyCreatorToUseClassProxying(registry);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user