From 79d2964a81b650772b25810dba0636d651942a26 Mon Sep 17 00:00:00 2001 From: omniCoder77 Date: Sun, 28 Sep 2025 20:23:25 +0530 Subject: [PATCH] fix: Replace deprecated ensureIndex with createIndex --- .../mongodb/customer/CustomerRepositoryIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java b/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java index 5a3e76dd6..3c0adbee1 100644 --- a/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java +++ b/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java @@ -129,7 +129,7 @@ void exposesGeoSpatialFunctionality() { indexDefinition.getIndexOptions().put("min", -180); indexDefinition.getIndexOptions().put("max", 180); - operations.indexOps(Customer.class).ensureIndex(indexDefinition); + operations.indexOps(Customer.class).createIndex(indexDefinition); var ollie = new Customer("Oliver", "Gierke"); ollie.setAddress(new Address(new Point(52.52548, 13.41477)));