Upgrade to Spring Data 2021.0.0-M2
Closes gh-24931
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 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");
|
* 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.
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
package org.springframework.boot.autoconfigure.data.elasticsearch;
|
package org.springframework.boot.autoconfigure.data.elasticsearch;
|
||||||
|
|
||||||
import org.elasticsearch.action.support.IndicesOptions;
|
import org.elasticsearch.action.support.IndicesOptions;
|
||||||
import org.elasticsearch.action.support.WriteRequest;
|
|
||||||
import org.elasticsearch.client.RestHighLevelClient;
|
import org.elasticsearch.client.RestHighLevelClient;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
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.ElasticsearchRestTemplate;
|
||||||
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations;
|
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations;
|
||||||
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchTemplate;
|
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.ElasticsearchConverter;
|
||||||
import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter;
|
import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter;
|
||||||
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
|
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
|
||||||
@@ -87,7 +87,7 @@ abstract class ElasticsearchDataConfiguration {
|
|||||||
ElasticsearchConverter converter) {
|
ElasticsearchConverter converter) {
|
||||||
ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter);
|
ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter);
|
||||||
template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed());
|
template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed());
|
||||||
template.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
|
template.setRefreshPolicy(RefreshPolicy.IMMEDIATE);
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 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");
|
* 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.
|
||||||
@@ -43,12 +43,6 @@ class SpringBootRepositoryRestConfigurer implements RepositoryRestConfigurer {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RepositoryRestProperties properties;
|
private RepositoryRestProperties properties;
|
||||||
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
|
|
||||||
configureRepositoryRestConfiguration(config, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
|
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
|
||||||
this.properties.applyTo(config);
|
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") {
|
group("org.springframework.data") {
|
||||||
imports = [
|
imports = [
|
||||||
"spring-data-bom"
|
"spring-data-bom"
|
||||||
|
|||||||
Reference in New Issue
Block a user