当前位置: 首页>>代码示例>>Java>>正文


Java BeanDefinitionBuilder.getRawBeanDefinition方法代码示例

本文整理汇总了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);
}
 
开发者ID:qq1588518,项目名称:JRediClients,代码行数:17,代码来源:RedissonDefinitionParser.java

示例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);
    }
}
 
开发者ID:qq1588518,项目名称:JRediClients,代码行数:24,代码来源:AbstractRedissonNamespaceDefinitionParser.java

示例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();
}
 
开发者ID:halober,项目名称:spring-boot-starter-dao,代码行数:13,代码来源:AbstractDataBaseBean.java

示例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();
}
 
开发者ID:halober,项目名称:spring-boot-starter-dao,代码行数:6,代码来源:AbstractDataBaseBean.java

示例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();
}
 
开发者ID:halober,项目名称:spring-boot-starter-dao,代码行数:16,代码来源:AbstractDataBaseBean.java

示例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();
}
 
开发者ID:halober,项目名称:spring-boot-starter-dao,代码行数:6,代码来源:AbstractDataBaseBean.java


注:本文中的org.springframework.beans.factory.support.BeanDefinitionBuilder.getRawBeanDefinition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。