Java 类org.springframework.data.repository.config.RepositoryConfigurationExtension 实例源码

项目:spring-data-snowdrop    文件:CdiUtils.java   
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);
    }
}
项目:spring-data-mybatis    文件:MybatisRepositoriesRegistrar.java   
@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);
}
项目:spring-data-snowdrop    文件:SnowdropNamespaceHandler.java   
@Override
public void init() {
    RepositoryConfigurationExtension extension = new SnowdropRepositoryConfigExtension();
    RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

    registerBeanDefinitionParser("repositories", parser);
}
项目:spring-data-ebean    文件:EbeanRepositoryNameSpaceHandler.java   
@Override
public void init() {

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

  registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
}
项目:lodsve-framework    文件:MongoBeanDefinitionRegistrar.java   
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);
}
项目:dubbox-solr    文件:SolrNamespaceHandler.java   
@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());
}
项目:spring-data-crate    文件:CrateNamespaceHandler.java   
@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());
}
项目:spring-data-solr    文件:SolrNamespaceHandler.java   
@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());
}
项目:spring-data-simpledb    文件:SimpleDbRepositoryNamespaceHandler.java   
@Override
public void init() {
    RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension();
    RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);

    registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
}
项目:spring-data-jdbc    文件:JdbcRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new JdbcRepositoryConfigExtension();
}
项目:spring-data-documentdb    文件:DocumentDbRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new DocumentDbRepositoryConfigurationExtension();
}
项目:spring-data-spanner    文件:SpannerRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
  return new SpannerRepositoryConfigurationExtension();
}
项目:azure-spring-boot    文件:DocumentDbRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new DocumentDbRepositoryConfigurationExtension();
}
项目:spring-data-tarantool    文件:TarantoolRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new TarantoolRepositoryConfigurationExtension();
}
项目:spring-data-snowdrop    文件:SnowdropRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
  return new SnowdropRepositoryConfigExtension();
}
项目:spring-multitenancy    文件:MultitenancyRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new MultitenancyConfigurationExtension();
}
项目:spring-multitenancy    文件:MultitenancyAutoConfigurationRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new MultitenancyConfigurationExtension();
}
项目:spring-boot-gae    文件:ObjectifyRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new ObjectifyRepositoryConfigurationExtension();
}
项目:spring-boot-gae    文件:ObjectifyRepositoriesAutoConfigurationRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new ObjectifyRepositoryConfigurationExtension();
}
项目:spring-data-gclouddatastore    文件:GcloudDatastoreRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new GcloudDatastoreRepositoryConfigurationExtension();
}
项目:spring-data-jdbc-template    文件:JdbcTemplateRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new JdbcTemplateRepositoryConfigExtension();
}
项目:spring-data-objectify    文件:ObjectifyRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new ObjectifyRepositoryConfigurationExtension();
}
项目:spring-data-mapdb    文件:MapDbRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new MapDbRepositoryConfigurationExtension();
}
项目:spring-data-ebean    文件:EbeanRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
  return new EbeanRepositoryConfigExtension();
}
项目:data-tarantool-spring-boot-starter    文件:TarantoolRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new TarantoolRepositoryConfigurationExtension();
}
项目:spring-data-mybatis    文件:MybatisRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
  return new MybatisRepositoryConfigExtension(resourceLoader);
}
项目:spring-boot-starter-data-mybatis    文件:MybatisRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
  return new MybatisRepositoryConfigExtension(resourceLoader);
}
项目:spring-vault    文件:VaultRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new VaultRepositoryConfigurationExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MongoRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new MongoRepositoryConfigurationExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:Neo4jRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new Neo4jRepositoryConfigurationExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JpaRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new JpaRepositoryConfigExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RedisRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new RedisRepositoryConfigurationExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CouchbaseRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new CouchbaseRepositoryConfigurationExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CassandraRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new CassandraRepositoryConfigurationExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ElasticsearchRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new ElasticsearchRepositoryConfigExtension();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SolrRepositoriesRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new SolrRepositoryConfigExtension();
}
项目:spring-data-arangodb    文件:ArangoDbRepositoriesRegistar.java   
@Override
protected RepositoryConfigurationExtension getExtension() {
    return new ArangoDbRepositoryConfigurationExtension();
}
项目:spring-boot-starter-mybatis    文件:MyBatisRepositoryNamespaceHandler.java   
@Override
public void init() {
    final RepositoryConfigurationExtension extension = new MyBatisRepositoryConfigExtension();
    final RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);
    registerBeanDefinitionParser(REPOSITORIES, repositoryBeanDefinitionParser);
}
项目:spring-boot-concourse    文件:MongoRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new MongoRepositoryConfigurationExtension();
}
项目:spring-boot-concourse    文件:Neo4jRepositoriesAutoConfigureRegistrar.java   
@Override
protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() {
    return new Neo4jRepositoryConfigurationExtension();
}