mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-10-12 21:38:54 +00:00
parent
ec7414c356
commit
a4fd008a24
@ -30,7 +30,6 @@ import java.util.Collections;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import org.apache.lucene.search.join.ScoreMode;
|
import org.apache.lucene.search.join.ScoreMode;
|
||||||
import org.elasticsearch.index.query.BoolQueryBuilder;
|
import org.elasticsearch.index.query.BoolQueryBuilder;
|
||||||
@ -50,7 +49,7 @@ import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
|
|||||||
import org.springframework.data.elasticsearch.core.query.IndexQuery;
|
import org.springframework.data.elasticsearch.core.query.IndexQuery;
|
||||||
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
|
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
|
||||||
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchTemplateConfiguration;
|
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchRestTemplateConfiguration;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
||||||
import org.springframework.data.elasticsearch.utils.IndexInitializer;
|
import org.springframework.data.elasticsearch.utils.IndexInitializer;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@ -63,7 +62,7 @@ import org.springframework.test.context.ContextConfiguration;
|
|||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
*/
|
*/
|
||||||
@SpringIntegrationTest
|
@SpringIntegrationTest
|
||||||
@ContextConfiguration(classes = { ElasticsearchTemplateConfiguration.class })
|
@ContextConfiguration(classes = { ElasticsearchRestTemplateConfiguration.class })
|
||||||
public class NestedObjectTests {
|
public class NestedObjectTests {
|
||||||
|
|
||||||
@Autowired private ElasticsearchOperations operations;
|
@Autowired private ElasticsearchOperations operations;
|
||||||
|
@ -25,7 +25,7 @@ import org.springframework.test.context.ContextConfiguration;
|
|||||||
* @author Peter-Josef Meisch
|
* @author Peter-Josef Meisch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration(classes = { EnableNestedElasticsearchRepositoriesTransportTests.Config.class })
|
@ContextConfiguration(classes = { EnableNestedElasticsearchRepositoriesTransportTests.Config.class })
|
||||||
public class EnableNestedElasticsearchRepositoriesTransportTests {
|
public class EnableNestedElasticsearchRepositoriesTransportTests extends EnableNestedElasticsearchRepositoriesTests {
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import({ ElasticsearchTemplateConfiguration.class })
|
@Import({ ElasticsearchTemplateConfiguration.class })
|
||||||
@EnableElasticsearchRepositories(considerNestedRepositories = true)
|
@EnableElasticsearchRepositories(considerNestedRepositories = true)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-15 the original author or authors.
|
* Copyright 2013-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -42,7 +42,7 @@ import org.springframework.data.elasticsearch.annotations.ScriptedField;
|
|||||||
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
||||||
import org.springframework.data.elasticsearch.core.IndexOperations;
|
import org.springframework.data.elasticsearch.core.IndexOperations;
|
||||||
import org.springframework.data.elasticsearch.core.geo.GeoPoint;
|
import org.springframework.data.elasticsearch.core.geo.GeoPoint;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchTemplateConfiguration;
|
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchRestTemplateConfiguration;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
||||||
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
|
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
|
||||||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
||||||
@ -71,7 +71,7 @@ public class EnableElasticsearchRepositoriesTests implements ApplicationContextA
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import({ ElasticsearchTemplateConfiguration.class })
|
@Import({ ElasticsearchRestTemplateConfiguration.class })
|
||||||
@EnableElasticsearchRepositories
|
@EnableElasticsearchRepositories
|
||||||
static class Config {}
|
static class Config {}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ import org.springframework.data.elasticsearch.core.query.IndexQuery;
|
|||||||
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
|
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
|
||||||
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
||||||
import org.springframework.data.elasticsearch.core.query.SeqNoPrimaryTerm;
|
import org.springframework.data.elasticsearch.core.query.SeqNoPrimaryTerm;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchTemplateConfiguration;
|
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchRestTemplateConfiguration;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
||||||
import org.springframework.data.geo.Box;
|
import org.springframework.data.geo.Box;
|
||||||
import org.springframework.data.geo.Circle;
|
import org.springframework.data.geo.Circle;
|
||||||
@ -85,7 +85,7 @@ import org.springframework.test.context.ContextConfiguration;
|
|||||||
* @author Roman Puchkovskiy
|
* @author Roman Puchkovskiy
|
||||||
*/
|
*/
|
||||||
@SpringIntegrationTest
|
@SpringIntegrationTest
|
||||||
@ContextConfiguration(classes = { ElasticsearchTemplateConfiguration.class })
|
@ContextConfiguration(classes = { ElasticsearchRestTemplateConfiguration.class })
|
||||||
public class MappingBuilderTests extends MappingContextBaseTests {
|
public class MappingBuilderTests extends MappingContextBaseTests {
|
||||||
|
|
||||||
@Autowired private ElasticsearchOperations operations;
|
@Autowired private ElasticsearchOperations operations;
|
||||||
|
@ -26,10 +26,7 @@ import org.springframework.data.elasticsearch.annotations.Document;
|
|||||||
import org.springframework.data.elasticsearch.annotations.DynamicTemplates;
|
import org.springframework.data.elasticsearch.annotations.DynamicTemplates;
|
||||||
import org.springframework.data.elasticsearch.annotations.Field;
|
import org.springframework.data.elasticsearch.annotations.Field;
|
||||||
import org.springframework.data.elasticsearch.annotations.FieldType;
|
import org.springframework.data.elasticsearch.annotations.FieldType;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchTemplateConfiguration;
|
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic templates tests
|
* Dynamic templates tests
|
||||||
@ -37,8 +34,6 @@ import org.springframework.test.context.ContextConfiguration;
|
|||||||
* @author Petr Kukral
|
* @author Petr Kukral
|
||||||
* @author Peter-Josef Meisch
|
* @author Peter-Josef Meisch
|
||||||
*/
|
*/
|
||||||
@SpringIntegrationTest
|
|
||||||
@ContextConfiguration(classes = { ElasticsearchTemplateConfiguration.class })
|
|
||||||
public class SimpleDynamicTemplatesMappingTests extends MappingContextBaseTests {
|
public class SimpleDynamicTemplatesMappingTests extends MappingContextBaseTests {
|
||||||
|
|
||||||
@Test // DATAES-568
|
@Test // DATAES-568
|
||||||
|
@ -31,7 +31,7 @@ import org.springframework.context.annotation.Import;
|
|||||||
import org.springframework.data.elasticsearch.annotations.Document;
|
import org.springframework.data.elasticsearch.annotations.Document;
|
||||||
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
||||||
import org.springframework.data.elasticsearch.core.IndexOperations;
|
import org.springframework.data.elasticsearch.core.IndexOperations;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchTemplateConfiguration;
|
import org.springframework.data.elasticsearch.junit.jupiter.ElasticsearchRestTemplateConfiguration;
|
||||||
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest;
|
||||||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
||||||
import org.springframework.data.repository.CrudRepository;
|
import org.springframework.data.repository.CrudRepository;
|
||||||
@ -49,7 +49,7 @@ import org.springframework.test.context.ContextConfiguration;
|
|||||||
public class ImmutableElasticsearchRepositoryTests {
|
public class ImmutableElasticsearchRepositoryTests {
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import({ ElasticsearchTemplateConfiguration.class })
|
@Import({ ElasticsearchRestTemplateConfiguration.class })
|
||||||
@EnableElasticsearchRepositories(basePackages = { "org.springframework.data.elasticsearch.immutable" },
|
@EnableElasticsearchRepositories(basePackages = { "org.springframework.data.elasticsearch.immutable" },
|
||||||
considerNestedRepositories = true)
|
considerNestedRepositories = true)
|
||||||
static class Config {}
|
static class Config {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user