本文整理汇总了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);
}
示例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");
}
示例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));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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);
}
示例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));
}
示例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));
}
示例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"));
}