From 067b349fb1b3e309676c7c4ebb2cf2c74a347102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=85browski?= Date: Thu, 23 Sep 2021 22:43:15 +0200 Subject: [PATCH 1/2] Stop considering persistent when scanning for Couchbase entities See gh-28124 --- .../data/couchbase/CouchbaseDataConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java index b9f55e4f46..594ce50cb2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java @@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.domain.EntityScanner; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.data.annotation.Persistent; import org.springframework.data.couchbase.config.BeanNames; import org.springframework.data.couchbase.core.convert.CouchbaseCustomConversions; import org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter; @@ -65,7 +64,7 @@ class CouchbaseDataConfiguration { throws Exception { CouchbaseMappingContext mappingContext = new CouchbaseMappingContext(); mappingContext - .setInitialEntitySet(new EntityScanner(applicationContext).scan(Document.class, Persistent.class)); + .setInitialEntitySet(new EntityScanner(applicationContext).scan(Document.class)); mappingContext.setSimpleTypeHolder(couchbaseCustomConversions.getSimpleTypeHolder()); Class fieldNamingStrategy = properties.getFieldNamingStrategy(); if (fieldNamingStrategy != null) { From 14fc0f78b27436285ee68fb4c2976cc6f97de7ec Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 1 Oct 2021 08:31:14 +0200 Subject: [PATCH 2/2] Polish "Stop considering persistent when scanning for Couchbase entities" See gh-28124 --- .../data/couchbase/CouchbaseDataConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java index 594ce50cb2..52b7220bcf 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataConfiguration.java @@ -63,8 +63,7 @@ class CouchbaseDataConfiguration { ApplicationContext applicationContext, CouchbaseCustomConversions couchbaseCustomConversions) throws Exception { CouchbaseMappingContext mappingContext = new CouchbaseMappingContext(); - mappingContext - .setInitialEntitySet(new EntityScanner(applicationContext).scan(Document.class)); + mappingContext.setInitialEntitySet(new EntityScanner(applicationContext).scan(Document.class)); mappingContext.setSimpleTypeHolder(couchbaseCustomConversions.getSimpleTypeHolder()); Class fieldNamingStrategy = properties.getFieldNamingStrategy(); if (fieldNamingStrategy != null) {