|
|
@ -94,14 +94,14 @@ public abstract class AutoProxyUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Expose the given target class for the specified bean. |
|
|
|
* Expose the given target class for the specified bean, if possible. |
|
|
|
* @param beanFactory the containing ConfigurableListableBeanFactory |
|
|
|
* @param beanFactory the containing ConfigurableListableBeanFactory |
|
|
|
* @param beanName the name of the bean |
|
|
|
* @param beanName the name of the bean |
|
|
|
* @param targetClass the corresponding target class
|
|
|
|
* @param targetClass the corresponding target class
|
|
|
|
* @since 4.2.3 |
|
|
|
* @since 4.2.3 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static void exposeTargetClass(ConfigurableListableBeanFactory beanFactory, String beanName, Class<?> targetClass) { |
|
|
|
static void exposeTargetClass(ConfigurableListableBeanFactory beanFactory, String beanName, Class<?> targetClass) { |
|
|
|
if (beanFactory.containsBeanDefinition(beanName)) { |
|
|
|
if (beanName != null && beanFactory.containsBeanDefinition(beanName)) { |
|
|
|
beanFactory.getMergedBeanDefinition(beanName).setAttribute(ORIGINAL_TARGET_CLASS_ATTRIBUTE, targetClass); |
|
|
|
beanFactory.getMergedBeanDefinition(beanName).setAttribute(ORIGINAL_TARGET_CLASS_ATTRIBUTE, targetClass); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|