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


Java AnnotationRepositoryConfigurationSource类代码示例

本文整理汇总了Java中org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource的典型用法代码示例。如果您正苦于以下问题:Java AnnotationRepositoryConfigurationSource类的具体用法?Java AnnotationRepositoryConfigurationSource怎么用?Java AnnotationRepositoryConfigurationSource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AnnotationRepositoryConfigurationSource类属于org.springframework.data.repository.config包,在下文中一共展示了AnnotationRepositoryConfigurationSource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getConfigurationSource

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
private AnnotationRepositoryConfigurationSource getConfigurationSource(
    BeanDefinitionRegistry registry) {
  StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(
      getConfiguration(), true);
  return new MybatisAnnotationRepositoryConfigurationSource(metadata, getAnnotation(),
      resourceLoader, this.environment, registry) {
    @Override
    public String[] getMapperLocations() {
      return MybatisRepositoriesAutoConfigureRegistrar.this.getMapperLocations();
    }

    @Override
    public Iterable<String> getBasePackages() {
      return MybatisRepositoriesAutoConfigureRegistrar.this.getBasePackages();
    }
  };
}
 
开发者ID:hatunet,项目名称:spring-boot-starter-data-mybatis,代码行数:18,代码来源:MybatisRepositoriesAutoConfigureRegistrar.java

示例2: initMongoRepository

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
private void initMongoRepository(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry) {
    AnnotationRepositoryConfigurationSource configurationSource = new LodsveAnnotationRepositoryConfigurationSource(annotationMetadata, EnableMongo.class, resourceLoader, environment);
    RepositoryConfigurationExtension extension = new LodsveMongoRepositoryConfigurationExtension(MONGO_TEMPLATE_BEAN_NAME);
    RepositoryConfigurationUtils.exposeRegistration(extension, registry, configurationSource);

    RepositoryConfigurationDelegate delegate = new RepositoryConfigurationDelegate(configurationSource, resourceLoader, environment);
    delegate.registerRepositoriesIn(registry, extension);
}
 
开发者ID:lodsve,项目名称:lodsve-framework,代码行数:9,代码来源:MongoBeanDefinitionRegistrar.java

示例3: getConfigurationSource

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
private AnnotationRepositoryConfigurationSource getConfigurationSource() {
	StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(
			getConfiguration(), true);
	return new AnnotationRepositoryConfigurationSource(metadata, getAnnotation(),
			this.resourceLoader, this.environment) {
		@Override
		public java.lang.Iterable<String> getBasePackages() {
			return AbstractRepositoryConfigurationSourceSupport.this
					.getBasePackages();
		}
	};
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:13,代码来源:AbstractRepositoryConfigurationSourceSupport.java

示例4: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {

	AnnotationAttributes attributes = config.getAttributes();
	if (!attributes.getBoolean("multicoreSupport")) {
		builder.addPropertyReference(BeanDefinition.SOLR_OPERATIONS.getBeanName(),
				attributes.getString("solrTemplateRef"));
	} else {
		builder.addPropertyReference(BeanDefinition.SOLR_CLIENT.getBeanName(), attributes.getString("solrClientRef"));
	}
	builder.addPropertyValue("schemaCreationSupport", attributes.getBoolean("schemaCreationSupport"));
	builder.addPropertyReference(BeanDefinition.SOLR_MAPPTING_CONTEXT.getBeanName(), "solrMappingContext");
}
 
开发者ID:yiduwangkai,项目名称:dubbox-solr,代码行数:14,代码来源:SolrRepositoryConfigExtension.java

示例5: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {

	AnnotationAttributes attributes = config.getAttributes();

	builder.addPropertyValue(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE,
			attributes.getBoolean(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE));
}
 
开发者ID:GeeQuery,项目名称:ef-orm,代码行数:9,代码来源:GqRepositoryConfigExtension.java

示例6: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {

	AnnotationAttributes attributes = config.getAttributes();
	if (!attributes.getBoolean("multicoreSupport")) {
		builder.addPropertyReference("solrOperations", attributes.getString("solrTemplateRef"));
	} else {
		builder.addPropertyReference("solrServer", attributes.getString("solrServerRef"));
	}
	builder.addPropertyValue("schemaCreationSupport", attributes.getBoolean("schemaCreationSupport"));
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:12,代码来源:SolrRepositoryConfigExtension.java

示例7: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {

	AnnotationAttributes attributes = config.getAttributes();

	builder.addPropertyReference("keyValueOperations", attributes.getString(KEY_VALUE_TEMPLATE_BEAN_REF_ATTRIBUTE));
	builder.addPropertyValue("queryCreator", getQueryCreatorType(config));
	builder.addPropertyValue("queryType", getQueryType(config));
	builder.addPropertyReference("mappingContext", getMappingContextBeanRef());
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:11,代码来源:KeyValueRepositoryConfigurationExtension.java

示例8: getQueryCreatorType

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
/**
 * Detects the query creator type to be used for the factory to set. Will lookup a {@link QueryCreatorType} annotation
 * on the {@code @Enable}-annotation or use {@link SpelQueryCreator} if not found.
 *
 * @param config must not be {@literal null}.
 * @return
 */
private static Class<?> getQueryCreatorType(AnnotationRepositoryConfigurationSource config) {

	AnnotationMetadata metadata = config.getEnableAnnotationMetadata();

	Map<String, Object> queryCreatorAnnotationAttributes = metadata
			.getAnnotationAttributes(QueryCreatorType.class.getName());

	if (CollectionUtils.isEmpty(queryCreatorAnnotationAttributes)) {
		return SpelQueryCreator.class;
	}

	AnnotationAttributes queryCreatorAttributes = new AnnotationAttributes(queryCreatorAnnotationAttributes);
	return queryCreatorAttributes.getClass("value");
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:22,代码来源:KeyValueRepositoryConfigurationExtension.java

示例9: getQueryType

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
/**
 * Detects the query creator type to be used for the factory to set. Will lookup a {@link QueryCreatorType} annotation
 * on the {@code @Enable}-annotation or use {@link SpelQueryCreator} if not found.
 *
 * @param config
 * @return
 */
private static Class<?> getQueryType(AnnotationRepositoryConfigurationSource config) {

	AnnotationMetadata metadata = config.getEnableAnnotationMetadata();

	Map<String, Object> queryCreatorAnnotationAttributes = metadata
			.getAnnotationAttributes(QueryCreatorType.class.getName());

	if (queryCreatorAnnotationAttributes == null) {
		return KeyValuePartTreeQuery.class;
	}

	AnnotationAttributes queryCreatorAttributes = new AnnotationAttributes(queryCreatorAnnotationAttributes);
	return queryCreatorAttributes.getClass("repositoryQueryType");
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:22,代码来源:KeyValueRepositoryConfigurationExtension.java

示例10: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
  AnnotationAttributes attributes = config.getAttributes();

  builder.addPropertyReference("spannerOperations", attributes.getString("spannerTemplateRef"));
}
 
开发者ID:saturnism,项目名称:spring-data-spanner,代码行数:7,代码来源:SpannerRepositoryConfigurationExtension.java

示例11: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
    AnnotationAttributes attributes = config.getAttributes();
    builder.addPropertyReference("datasourceMapper", attributes.getString("datasourceMapperRef"));
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:6,代码来源:SnowdropRepositoryConfigExtension.java

示例12: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
    builder.addPropertyReference("mongoOperations", mongoTemplateId);
    builder.addPropertyValue("createIndexesForQueryMethods", false);
}
 
开发者ID:lodsve,项目名称:lodsve-framework,代码行数:6,代码来源:LodsveMongoRepositoryConfigurationExtension.java

示例13: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
    AnnotationAttributes attributes = config.getAttributes();
    builder.addPropertyValue(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE, attributes.getBoolean(ENABLE_DEFAULT_TRANSACTIONS_ATTRIBUTE));
}
 
开发者ID:hatunet,项目名称:spring-data-mybatis,代码行数:6,代码来源:MybatisRepositoryConfigExtension.java

示例14: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(final BeanDefinitionBuilder builder, final AnnotationRepositoryConfigurationSource config) {
    final AnnotationAttributes attributes = config.getAttributes();
    builder.addPropertyReference(SQL_SESSION_TEMPLATE, attributes.getString(SQL_SESSION_TEMPLATE_REF));
    builder.addPropertyValue(TRANSACTION_MANAGER, attributes.getString(TRANSACTION_MANAGER_REF));
}
 
开发者ID:create1st,项目名称:spring-boot-starter-mybatis,代码行数:7,代码来源:MyBatisRepositoryConfigExtension.java

示例15: postProcess

import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; //导入依赖的package包/类
@Override
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {

	AnnotationAttributes attributes = config.getAttributes();
	builder.addPropertyReference("crateOperations", attributes.getString("crateTemplateRef"));
}
 
开发者ID:KPTechnologyLab,项目名称:spring-data-crate,代码行数:7,代码来源:CrateRepositoryConfigExtension.java


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