mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix Spring Data Elasticsearch deprecations
See gh-26078
This commit is contained in:
parent
6f2b4aa685
commit
4a1924ed73
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -20,8 +20,10 @@ import java.io.Serializable;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.elasticsearch.annotations.Document;
|
||||
import org.springframework.data.elasticsearch.annotations.Setting;
|
||||
|
||||
@Document(indexName = "city", shards = 1, replicas = 0, refreshInterval = "-1")
|
||||
@Document(indexName = "city")
|
||||
@Setting(shards = 1, replicas = 0, refreshInterval = "-1")
|
||||
public class City implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -18,8 +18,10 @@ package smoketest.data.elasticsearch;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.elasticsearch.annotations.Document;
|
||||
import org.springframework.data.elasticsearch.annotations.Setting;
|
||||
|
||||
@Document(indexName = "customer", shards = 1, replicas = 0, refreshInterval = "-1")
|
||||
@Document(indexName = "customer")
|
||||
@Setting(shards = 1, replicas = 0, refreshInterval = "-1")
|
||||
public class Customer {
|
||||
|
||||
@Id
|
||||
|
Loading…
Reference in New Issue
Block a user