本文整理汇总了Java中org.springframework.beans.factory.support.BeanDefinitionBuilder.getRawBeanDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java BeanDefinitionBuilder.getRawBeanDefinition方法的具体用法?Java BeanDefinitionBuilder.getRawBeanDefinition怎么用?Java BeanDefinitionBuilder.getRawBeanDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.beans.factory.support.BeanDefinitionBuilder
的用法示例。
在下文中一共展示了BeanDefinitionBuilder.getRawBeanDefinition方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseConfigTypes
import org.springframework.beans.factory.support.BeanDefinitionBuilder; //导入方法依赖的package包/类
private void parseConfigTypes(Element element, String configType, BeanDefinitionBuilder redissonDef, ParserContext parserContext) {
BeanDefinitionBuilder builder
= helper.createBeanDefinitionBuilder(element,
parserContext, null);
//Use factory method on the Config bean
AbstractBeanDefinition bd = builder.getRawBeanDefinition();
bd.setFactoryMethodName("use" + StringUtils.capitalize(configType));
bd.setFactoryBeanName(parserContext.getContainingComponent().getName());
String id = parserContext.getReaderContext().generateBeanName(bd);
helper.registerBeanDefinition(builder, id,
helper.parseAliase(element), parserContext);
helper.parseAttributes(element, parserContext, builder);
redissonDef.addDependsOn(id);
parseChildElements(element, id, null, redissonDef, parserContext);
parserContext.getDelegate().parseQualifierElements(element, bd);
}
示例2: doParse
import org.springframework.beans.factory.support.BeanDefinitionBuilder; //导入方法依赖的package包/类
@Override
protected final void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
Assert.state(helper.isRedissonNS(element),
"Illegal state. "
+ this.getClass().getName()
+ " can only parse "
+ RedissonNamespaceParserSupport.REDISSON_NAMESPACE
+ " namespace elements");
Assert.state(element.hasAttribute(parentRefAttribute),
"Illegal state. property \"" + parentRefAttribute
+ "\" is required in the \""
+ helper.getName(element)
+ "\" element.");
helper.populateIdAttribute(element, builder, parserContext);
AbstractBeanDefinition bd = builder.getRawBeanDefinition();
parseNested(element, parserContext, builder, bd);
decorator.decorate(element, parserContext, builder, helper);
parserContext.getDelegate().parseQualifierElements(element, bd);
if (parserContext.isNested()) {
helper.registerBeanDefinition(builder, element, parserContext);
}
}
示例3: createDataSource
import org.springframework.beans.factory.support.BeanDefinitionBuilder; //导入方法依赖的package包/类
protected final AbstractBeanDefinition createDataSource(MybatisNodeProperties druidNodeConfig,
DruidProperties defaultConfig, String dataSourceName) {
Assert.notNull(druidNodeConfig, String
.format("DynamicDataSource 未初始化 ,dataSourceName=%s,失败原因: 配置参数为空,你的配置可能存在问题!", dataSourceName + ""));
BeanDefinitionBuilder definitionBuilder = BeanDefinitionBuilder.genericBeanDefinition(DynamicDataSource.class);
definitionBuilder.addConstructorArgValue(druidNodeConfig);
definitionBuilder.addConstructorArgValue(defaultConfig);
definitionBuilder.addConstructorArgValue(dataSourceName);
definitionBuilder.setInitMethodName("init");
definitionBuilder.setDestroyMethodName("close");
return definitionBuilder.getRawBeanDefinition();
}
示例4: createJdbcTemplate
import org.springframework.beans.factory.support.BeanDefinitionBuilder; //导入方法依赖的package包/类
protected final AbstractBeanDefinition createJdbcTemplate(String dataSourceName) {
BeanDefinitionBuilder bdb = BeanDefinitionBuilder.genericBeanDefinition(JdbcTemplate.class);
bdb.addConstructorArgReference(dataSourceName);
return bdb.getRawBeanDefinition();
}
示例5: createScannerConfigurerBean
import org.springframework.beans.factory.support.BeanDefinitionBuilder; //导入方法依赖的package包/类
protected final AbstractBeanDefinition createScannerConfigurerBean(String sqlSessionFactoryName, String basepackage,
Mapper mappers, Order order,Style style) {
BeanDefinitionBuilder bdb = BeanDefinitionBuilder.genericBeanDefinition(MapperScannerConfigurer.class);
Properties properties = new Properties();
if(style!=null){
properties.setProperty("style", style.name());
}
properties.setProperty("notEmpty", "true");
properties.setProperty("ORDER", order != null ? order.order : Order.BEFORE.order);
properties.setProperty("mappers", mappers != null ? mappers.mapper : Mapper.DEFAULT.mapper);
bdb.addPropertyValue("properties", properties);
bdb.addPropertyValue("sqlSessionFactoryBeanName", sqlSessionFactoryName);
bdb.addPropertyValue("basePackage", basepackage);
return bdb.getRawBeanDefinition();
}
示例6: createTransactionManager
import org.springframework.beans.factory.support.BeanDefinitionBuilder; //导入方法依赖的package包/类
protected final AbstractBeanDefinition createTransactionManager(String dataSourceName) {
BeanDefinitionBuilder bdb = BeanDefinitionBuilder.genericBeanDefinition(DataSourceTransactionManager.class);
bdb.addConstructorArgReference(dataSourceName);
return bdb.getRawBeanDefinition();
}