本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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());
}
示例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());
}
示例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);
}
示例10: getExtension
import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
return new JdbcRepositoryConfigExtension();
}
示例11: getExtension
import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
return new DocumentDbRepositoryConfigurationExtension();
}
示例12: getExtension
import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
return new SpannerRepositoryConfigurationExtension();
}
示例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();
}
示例15: getExtension
import org.springframework.data.repository.config.RepositoryConfigurationExtension; //导入依赖的package包/类
@Override
protected RepositoryConfigurationExtension getExtension() {
return new SnowdropRepositoryConfigExtension();
}