Skip to content

Commit 351370b

Browse files
authored
Do not scan Persistent annotated classes. (#1180)
Only scan Document annotated classes. Closes #1121.
1 parent 3e51707 commit 351370b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/springframework/data/couchbase/config/AbstractCouchbaseConfiguration.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
2828
import org.springframework.context.annotation.Configuration;
2929
import org.springframework.core.type.filter.AnnotationTypeFilter;
30-
import org.springframework.data.annotation.Persistent;
3130
import org.springframework.data.convert.CustomConversions;
3231
import org.springframework.data.couchbase.CouchbaseClientFactory;
3332
import org.springframework.data.couchbase.SimpleCouchbaseClientFactory;
@@ -68,6 +67,7 @@
6867
* @author Stephane Nicoll
6968
* @author Subhashni Balakrishnan
7069
* @author Jorge Rodriguez Martin
70+
* @author Michael Reiche
7171
*/
7272
@Configuration
7373
public abstract class AbstractCouchbaseConfiguration {
@@ -230,7 +230,6 @@ protected Set<Class<?>> getInitialEntitySet() throws ClassNotFoundException {
230230
ClassPathScanningCandidateComponentProvider componentProvider = new ClassPathScanningCandidateComponentProvider(
231231
false);
232232
componentProvider.addIncludeFilter(new AnnotationTypeFilter(Document.class));
233-
componentProvider.addIncludeFilter(new AnnotationTypeFilter(Persistent.class));
234233
for (BeanDefinition candidate : componentProvider.findCandidateComponents(basePackage)) {
235234
initialEntitySet.add(
236235
ClassUtils.forName(candidate.getBeanClassName(), AbstractCouchbaseConfiguration.class.getClassLoader()));

0 commit comments

Comments
 (0)