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


Java RepositoryConfigurationExtension类代码示例

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


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

示例1: findNamedQueries

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
static NamedQueries findNamedQueries(Class<?> repositoryClass) {
    try {
        RepositoryConfigurationExtension config = new SnowdropRepositoryConfigExtension();
        String location = config.getDefaultNamedQueryLocation();

        PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(repositoryClass.getClassLoader());
        ResourceArrayPropertyEditor editor = new ResourceArrayPropertyEditor(resolver, null);
        editor.setAsText(location);
        Resource[] resources = (Resource[]) editor.getValue();

        PropertiesFactoryBean pfb = new PropertiesFactoryBean();
        pfb.setSingleton(false);
        pfb.setLocations(resources);
        pfb.setFileEncoding("UTF-8");
        Properties properties = pfb.getObject();

        return new PropertiesBasedNamedQueries(properties);
    } catch (IOException e) {
        throw new IllegalStateException(e);
    }
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:22,代码来源:CdiUtils.java

示例2: registerBeanDefinitions

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void registerBeanDefinitions(AnnotationMetadata annotationMetadata,
    BeanDefinitionRegistry registry) {
  Assert.notNull(resourceLoader, "ResourceLoader must not be null!");
  Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null!");
  Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");

  // Guard against calls for sub-classes
  if (annotationMetadata.getAnnotationAttributes(getAnnotation().getName()) == null) {
    return;
  }

  MybatisAnnotationRepositoryConfigurationSource configurationSource = new MybatisAnnotationRepositoryConfigurationSource(
      annotationMetadata, getAnnotation(), resourceLoader, environment, registry);

  RepositoryConfigurationExtension extension = getExtension();
  RepositoryConfigurationUtils.exposeRegistration(extension, registry, configurationSource);

  RepositoryConfigurationDelegate delegate = new RepositoryConfigurationDelegate(
      configurationSource, resourceLoader,
      environment);

  delegate.registerRepositoriesIn(registry, extension);
}
 
开发者ID:hatunet,项目名称:spring-data-mybatis,代码行数:25,代码来源:MybatisRepositoriesRegistrar.java

示例3: init

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void init() {
    RepositoryConfigurationExtension extension = new SnowdropRepositoryConfigExtension();
    RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

    registerBeanDefinitionParser("repositories", parser);
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:8,代码来源:SnowdropNamespaceHandler.java

示例4: init

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void init() {

  RepositoryConfigurationExtension extension = new EbeanRepositoryConfigExtension();
  RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);

  registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
}
 
开发者ID:hexagonframework,项目名称:spring-data-ebean,代码行数:9,代码来源:EbeanRepositoryNameSpaceHandler.java

示例5: initMongoRepository

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的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

示例6: init

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void init() {

	RepositoryConfigurationExtension extension = new SolrRepositoryConfigExtension();
	RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

	registerBeanDefinitionParser("repositories", parser);
	registerBeanDefinitionParser("embedded-solr-server", new EmbeddedSolrServerBeanDefinitionParser());
	registerBeanDefinitionParser("solr-client", new HttpSolrClientBeanDefinitionParser());
}
 
开发者ID:yiduwangkai,项目名称:dubbox-solr,代码行数:11,代码来源:SolrNamespaceHandler.java

示例7: init

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void init() {
    RepositoryConfigurationExtension extension = new CrateRepositoryConfigExtension();
    RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

    registerBeanDefinitionParser("repositories", parser);
    registerBeanDefinitionParser("client", new CrateClientBeanDefinitionParser());
    registerBeanDefinitionParser("schema-export", new CratePersistentEntitySchemaManagerBeanDefinitionParser());
}
 
开发者ID:KPTechnologyLab,项目名称:spring-data-crate,代码行数:10,代码来源:CrateNamespaceHandler.java

示例8: init

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void init() {

	RepositoryConfigurationExtension extension = new SolrRepositoryConfigExtension();
	RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

	registerBeanDefinitionParser("repositories", parser);
	registerBeanDefinitionParser("embedded-solr-server", new EmbeddedSolrServerBeanDefinitionParser());
	registerBeanDefinitionParser("solr-server", new HttpSolrServerBeanDefinitionParser());
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:11,代码来源:SolrNamespaceHandler.java

示例9: init

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
public void init() {
	RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension();
	RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);

	registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
}
 
开发者ID:3pillarlabs,项目名称:spring-data-simpledb,代码行数:8,代码来源:SimpleDbRepositoryNamespaceHandler.java

示例10: getExtension

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new JdbcRepositoryConfigExtension();
}
 
开发者ID:rubasace,项目名称:spring-data-jdbc,代码行数:5,代码来源:JdbcRepositoriesRegistrar.java

示例11: getExtension

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new DocumentDbRepositoryConfigurationExtension();
}
 
开发者ID:Microsoft,项目名称:spring-data-documentdb,代码行数:5,代码来源:DocumentDbRepositoriesRegistrar.java

示例12: getExtension

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
  return new SpannerRepositoryConfigurationExtension();
}
 
开发者ID:saturnism,项目名称:spring-data-spanner,代码行数:5,代码来源:SpannerRepositoriesRegistrar.java

示例13: getRepositoryConfigurationExtension

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new DocumentDbRepositoryConfigurationExtension();
}
 
开发者ID:Microsoft,项目名称:azure-spring-boot,代码行数:5,代码来源:DocumentDbRepositoriesAutoConfigureRegistrar.java

示例14: getExtension

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new TarantoolRepositoryConfigurationExtension();
}
 
开发者ID:saladinkzn,项目名称:spring-data-tarantool,代码行数:5,代码来源:TarantoolRepositoriesRegistrar.java

示例15: getExtension

import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
  return new SnowdropRepositoryConfigExtension();
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:5,代码来源:SnowdropRepositoriesRegistrar.java


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