本文整理匯總了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;
}