Skip to content

Commit a95e93a

Browse files
committed
Merge branch '2.4.x'
Closes gh-25347
2 parents d69565c + 08e8674 commit a95e93a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,7 +35,6 @@
3535
import org.springframework.context.ApplicationContext;
3636
import org.springframework.context.annotation.Bean;
3737
import org.springframework.context.annotation.Configuration;
38-
import org.springframework.data.annotation.Persistent;
3938
import org.springframework.data.neo4j.core.DatabaseSelectionProvider;
4039
import org.springframework.data.neo4j.core.Neo4jClient;
4140
import org.springframework.data.neo4j.core.Neo4jOperations;
@@ -78,7 +77,7 @@ public Neo4jConversions neo4jConversions() {
7877
@ConditionalOnMissingBean
7978
public Neo4jMappingContext neo4jMappingContext(ApplicationContext applicationContext,
8079
Neo4jConversions neo4jConversions) throws ClassNotFoundException {
81-
Set<Class<?>> initialEntityClasses = new EntityScanner(applicationContext).scan(Node.class, Persistent.class,
80+
Set<Class<?>> initialEntityClasses = new EntityScanner(applicationContext).scan(Node.class,
8281
RelationshipProperties.class);
8382
Neo4jMappingContext context = new Neo4jMappingContext(neo4jConversions);
8483
context.setInitialEntitySet(initialEntityClasses);

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -148,7 +148,7 @@ void shouldFilterInitialEntityScanWithKnownAnnotations() {
148148
this.contextRunner.withUserConfiguration(EntityScanConfig.class).run((context) -> {
149149
Neo4jMappingContext mappingContext = context.getBean(Neo4jMappingContext.class);
150150
assertThat(mappingContext.hasPersistentEntityFor(TestNode.class)).isTrue();
151-
assertThat(mappingContext.hasPersistentEntityFor(TestPersistent.class)).isTrue();
151+
assertThat(mappingContext.hasPersistentEntityFor(TestPersistent.class)).isFalse();
152152
assertThat(mappingContext.hasPersistentEntityFor(TestRelationshipProperties.class)).isTrue();
153153
assertThat(mappingContext.hasPersistentEntityFor(TestNonAnnotated.class)).isFalse();
154154
});

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -132,7 +132,7 @@ void shouldFilterInitialEntityScanWithKnownAnnotations() {
132132
this.contextRunner.withUserConfiguration(EntityScanConfig.class).run((context) -> {
133133
Neo4jMappingContext mappingContext = context.getBean(Neo4jMappingContext.class);
134134
assertThat(mappingContext.hasPersistentEntityFor(TestNode.class)).isTrue();
135-
assertThat(mappingContext.hasPersistentEntityFor(TestPersistent.class)).isTrue();
135+
assertThat(mappingContext.hasPersistentEntityFor(TestPersistent.class)).isFalse();
136136
assertThat(mappingContext.hasPersistentEntityFor(TestRelationshipProperties.class)).isTrue();
137137
assertThat(mappingContext.hasPersistentEntityFor(TestNonAnnotated.class)).isFalse();
138138
});

0 commit comments

Comments
 (0)