List of usage examples for org.springframework.aop.framework.autoproxy AutoProxyUtils shouldProxyTargetClass
public static boolean shouldProxyTargetClass(ConfigurableListableBeanFactory beanFactory, @Nullable String beanName)
From source file:org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.java
/** * Determine whether the given bean should be proxied with its target class rather than its interfaces. * <p>Checks the {@link AutoProxyUtils#PRESERVE_TARGET_CLASS_ATTRIBUTE "preserveTargetClass" attribute} * of the corresponding bean definition. * @param beanClass the class of the bean * @param beanName the name of the bean/*from w ww.j a v a 2 s . com*/ * @return whether the given bean should be proxied with its target class * @see AutoProxyUtils#shouldProxyTargetClass */ protected boolean shouldProxyTargetClass(Class<?> beanClass, @Nullable String beanName) { return (this.beanFactory instanceof ConfigurableListableBeanFactory && AutoProxyUtils .shouldProxyTargetClass((ConfigurableListableBeanFactory) this.beanFactory, beanName)); }