Commit 4c2a7db4 authored by Stephane Nicoll's avatar Stephane Nicoll

Upgrade to Spring Data 2021.0.0-M2

Closes gh-24931
parent 20b7016a
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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.
......@@ -17,7 +17,6 @@
package org.springframework.boot.autoconfigure.data.elasticsearch;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
......@@ -30,6 +29,7 @@ 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.MappingElasticsearchConverter;
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
......@@ -87,7 +87,7 @@ abstract class ElasticsearchDataConfiguration {
ElasticsearchConverter converter) {
ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter);
template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed());
template.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
template.setRefreshPolicy(RefreshPolicy.IMMEDIATE);
return template;
}
......
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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.
......@@ -43,12 +43,6 @@ class SpringBootRepositoryRestConfigurer implements RepositoryRestConfigurer {
@Autowired
private RepositoryRestProperties properties;
@Override
@SuppressWarnings("deprecation")
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
configureRepositoryRestConfiguration(config, null);
}
@Override
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
this.properties.applyTo(config);
......
......@@ -1552,7 +1552,7 @@ bom {
]
}
}
library("Spring Data Bom", "2020.0.2") {
library("Spring Data Bom", "2021.0.0-M2") {
group("org.springframework.data") {
imports = [
"spring-data-bom"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment