本文整理汇总了Java中org.springframework.beans.factory.support.GenericBeanDefinition.getBeanClassName方法的典型用法代码示例。如果您正苦于以下问题:Java GenericBeanDefinition.getBeanClassName方法的具体用法?Java GenericBeanDefinition.getBeanClassName怎么用?Java GenericBeanDefinition.getBeanClassName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.beans.factory.support.GenericBeanDefinition
的用法示例。
在下文中一共展示了GenericBeanDefinition.getBeanClassName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processBeanDefinitions
import org.springframework.beans.factory.support.GenericBeanDefinition; //导入方法依赖的package包/类
/**
* Process the bean definitions.
*
* @param beanDefinitions the bean definitions
*/
private void processBeanDefinitions(Set<BeanDefinitionHolder> beanDefinitions) {
for (BeanDefinitionHolder beanDefinition : beanDefinitions) {
GenericBeanDefinition definition = (GenericBeanDefinition) beanDefinition.getBeanDefinition();
final String serviceClassName = definition.getBeanClassName();
definition.setBeanClass(JaxRsClientProxyFactoryBean.class);
definition.getPropertyValues().add("serviceClass", serviceClassName);
definition.getPropertyValues().add("serviceUrl", serviceUrl);
definition.getPropertyValues().add("serviceUrlProvider", serviceUrlProvider);
}
}
示例2: doScan
import org.springframework.beans.factory.support.GenericBeanDefinition; //导入方法依赖的package包/类
/**
* Calls the parent search that will search and register all the candidates.
* Then the registered objects are post processed to set them as
* MapperFactoryBeans
*/
@Override
public Set<BeanDefinitionHolder> doScan(String... basePackages) {
Set<BeanDefinitionHolder> beanDefinitions = super.doScan(basePackages);
if (beanDefinitions.isEmpty()) {
logger.warn("No DaoService was found in '"
+ Arrays.toString(basePackages)
+ "' package. Please check your configuration.");
} else {
for (BeanDefinitionHolder holder : beanDefinitions) {
GenericBeanDefinition definition = (GenericBeanDefinition) holder
.getBeanDefinition();
if (logger.isDebugEnabled()) {
logger.debug("Creating DaoFactoryBean with name '"
+ holder.getBeanName() + "' and '"
+ definition.getBeanClassName() + "' daoInterface");
}
// the mapper interface is the original class of the bean
// but, the actual class of the bean is HibernateDaoFactoryBean
definition.getPropertyValues().add("daoInterface",
definition.getBeanClassName());
definition.getPropertyValues().add("funcs", functions);
String className = definition.getBeanClassName();
int idx = className.lastIndexOf(".");
if (idx > 0)
className = className.substring(idx + 1);
String em = daoEntityManagerNames.get(className);
if (em == null)
em = entityManagerName;
String sf = daoSessionFactoryNames.get(className);
if (sf == null)
sf = sessionFactoryName;
definition.getPropertyValues().add("entityManagerName", em);
definition.getPropertyValues().add("sessionFactoryName", sf);
definition.setBeanClass(DaoFactoryBean.class);
definition
.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);
}
}
return beanDefinitions;
}