From a8bddeb9cf9b89507eeaf604a89595a231f003a6 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 22 Mar 2022 20:12:09 +0000 Subject: [PATCH] Remove redundant setting of refresh policy Closes gh-30375 --- .../data/elasticsearch/ElasticsearchDataConfiguration.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataConfiguration.java index a7e4178242..4a8ee1b3ff 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,6 @@ import org.springframework.data.elasticsearch.core.ElasticsearchOperations; import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations; import org.springframework.data.elasticsearch.core.ReactiveElasticsearchTemplate; -import org.springframework.data.elasticsearch.core.RefreshPolicy; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchCustomConversions; import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter; @@ -107,7 +106,6 @@ abstract class ElasticsearchDataConfiguration { ElasticsearchConverter converter) { ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter); template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed()); - template.setRefreshPolicy(RefreshPolicy.IMMEDIATE); return template; }