Skip to content

Commit 24ab638

Browse files
bclozelwilkinsona
authored andcommitted
Create spring-boot-elasticsearch module
1 parent d95069c commit 24ab638

File tree

48 files changed

+219
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+219
-154
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ include "spring-boot-project:spring-boot-dependencies"
5151
include "spring-boot-project:spring-boot-devtools"
5252
include "spring-boot-project:spring-boot-docker-compose"
5353
include "spring-boot-project:spring-boot-docs"
54+
include "spring-boot-project:spring-boot-elasticsearch"
5455
include "spring-boot-project:spring-boot-flyway"
5556
include "spring-boot-project:spring-boot-freemarker"
5657
include "spring-boot-project:spring-boot-groovy-templates"

spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies {
2020
optional(project(":spring-boot-project:spring-boot-activemq"))
2121
optional(project(":spring-boot-project:spring-boot-amqp"))
2222
optional(project(":spring-boot-project:spring-boot-artemis"))
23+
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
2324
optional(project(":spring-boot-project:spring-boot-flyway"))
2425
optional(project(":spring-boot-project:spring-boot-jackson"))
2526
optional(project(":spring-boot-project:spring-boot-jdbc"))

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/data/elasticsearch/ElasticsearchReactiveHealthContributorAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
31-
import org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration;
3231
import org.springframework.context.annotation.Bean;
3332
import org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchClient;
3433

@@ -40,7 +39,8 @@
4039
* @author Aleksander Lech
4140
* @since 2.3.2
4241
*/
43-
@AutoConfiguration(after = ReactiveElasticsearchClientAutoConfiguration.class)
42+
@AutoConfiguration(
43+
afterName = "org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration")
4444
@ConditionalOnClass({ ReactiveElasticsearchClient.class, Flux.class })
4545
@ConditionalOnBean(ReactiveElasticsearchClient.class)
4646
@ConditionalOnEnabledHealthIndicator("elasticsearch")

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/elasticsearch/ElasticsearchRestHealthContributorAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
31-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
3231
import org.springframework.context.annotation.Bean;
3332

3433
/**
@@ -38,7 +37,8 @@
3837
* @author Artsiom Yudovin
3938
* @since 2.1.1
4039
*/
41-
@AutoConfiguration(after = ElasticsearchRestClientAutoConfiguration.class)
40+
@AutoConfiguration(
41+
afterName = "org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration")
4242
@ConditionalOnClass(RestClient.class)
4343
@ConditionalOnBean(RestClient.class)
4444
@ConditionalOnEnabledHealthIndicator("elasticsearch")

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/data/elasticsearch/ElasticsearchReactiveHealthContributorAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import org.springframework.boot.actuate.elasticsearch.ElasticsearchRestClientHealthIndicator;
2525
import org.springframework.boot.autoconfigure.AutoConfigurations;
2626
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
28-
import org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration;
27+
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration;
28+
import org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration;
2929
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3030

3131
import static org.assertj.core.api.Assertions.assertThat;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/elasticsearch/ElasticsearchRestHealthContributorAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
2424
import org.springframework.boot.actuate.elasticsearch.ElasticsearchRestClientHealthIndicator;
2525
import org.springframework.boot.autoconfigure.AutoConfigurations;
26-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
26+
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration;
2727
import org.springframework.boot.test.context.FilteredClassLoader;
2828
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2929
import org.springframework.context.annotation.Bean;

spring-boot-project/spring-boot-autoconfigure-all/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies {
4444

4545
optional(project(":spring-boot-project:spring-boot-activemq"))
4646
optional(project(":spring-boot-project:spring-boot-artemis"))
47+
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
4748
optional(project(":spring-boot-project:spring-boot-flyway"))
4849
optional(project(":spring-boot-project:spring-boot-jackson"))
4950
optional(project(":spring-boot-project:spring-boot-jdbc"))

spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
import org.springframework.boot.autoconfigure.data.elasticsearch.city.City;
2828
import org.springframework.boot.autoconfigure.data.elasticsearch.city.CityRepository;
2929
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
30-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchClientAutoConfiguration;
31-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
30+
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchClientAutoConfiguration;
31+
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration;
3232
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3333
import org.springframework.boot.testsupport.container.TestImage;
3434
import org.springframework.context.annotation.Configuration;

spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import org.springframework.boot.autoconfigure.data.elasticsearch.city.City;
2929
import org.springframework.boot.autoconfigure.data.elasticsearch.city.ReactiveCityRepository;
3030
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
31-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchClientAutoConfiguration;
32-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
33-
import org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration;
31+
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchClientAutoConfiguration;
32+
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration;
33+
import org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration;
3434
import org.springframework.boot.test.context.FilteredClassLoader;
3535
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3636
import org.springframework.boot.testsupport.container.TestImage;

spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import org.springframework.boot.autoconfigure.AutoConfiguration;
2020
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2121
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
22-
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchClientAutoConfiguration;
23-
import org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration;
2422
import org.springframework.context.annotation.Import;
2523
import org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate;
2624
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
@@ -38,7 +36,8 @@
3836
* @see EnableReactiveElasticsearchRepositories
3937
*/
4038
@AutoConfiguration(
41-
after = { ElasticsearchClientAutoConfiguration.class, ReactiveElasticsearchClientAutoConfiguration.class })
39+
afterName = { "org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchClientAutoConfiguration",
40+
"org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration" })
4241
@ConditionalOnClass({ ElasticsearchTemplate.class })
4342
@Import({ ElasticsearchDataConfiguration.BaseConfiguration.class,
4443
ElasticsearchDataConfiguration.JavaClientConfiguration.class,

0 commit comments

Comments
 (0)