From 2277b274a3420f0fe14ce0144d0216f07694346c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 23 Apr 2025 10:48:51 +0100 Subject: [PATCH] Create spring-boot-data-neo4j module --- settings.gradle | 1 + .../build.gradle | 2 +- ...intsAutoConfigurationIntegrationTests.java | 6 +- .../build.gradle | 3 - ...itional-spring-configuration-metadata.json | 78 --------- ...ot.autoconfigure.AutoConfiguration.imports | 4 - .../data/alt/neo4j/CityNeo4jRepository.java | 24 --- ...o4jRepositoriesAutoConfigurationTests.java | 160 ------------------ .../spring-boot-data-neo4j/build.gradle | 33 ++++ ...riesAutoConfigurationIntegrationTests.java | 4 +- .../Neo4jDataAutoConfiguration.java | 2 +- .../autoconfigure}/Neo4jDataProperties.java | 2 +- .../Neo4jReactiveDataAutoConfiguration.java | 2 +- ...ReactiveRepositoriesAutoConfiguration.java | 4 +- .../Neo4jReactiveRepositoriesRegistrar.java | 4 +- .../Neo4jRepositoriesAutoConfiguration.java | 4 +- .../Neo4jRepositoriesRegistrar.java | 4 +- .../neo4j/autoconfigure}/package-info.java | 4 +- ...itional-spring-configuration-metadata.json | 83 +++++++++ ...ot.autoconfigure.AutoConfiguration.imports | 4 + .../MockedDriverConfiguration.java | 4 +- .../Neo4jDataAutoConfigurationTests.java | 10 +- ...o4jReactiveDataAutoConfigurationTests.java | 10 +- ...iveRepositoriesAutoConfigurationTests.java | 18 +- ...o4jRepositoriesAutoConfigurationTests.java | 18 +- .../boot/data/neo4j/domain}/city/City.java | 6 +- .../neo4j/domain}/city/CityRepository.java | 4 +- .../domain}/city/ReactiveCityRepository.java | 4 +- .../data/neo4j/domain}/country/Country.java | 4 +- .../domain}/country/CountryRepository.java | 4 +- .../country/ReactiveCountryRepository.java | 4 +- .../neo4j/domain/empty/EmptyPackage.java} | 6 +- .../data/neo4j/domain}/scan/TestNode.java | 4 +- .../neo4j/domain}/scan/TestNonAnnotated.java | 4 +- .../neo4j/domain}/scan/TestPersistent.java | 4 +- .../scan/TestRelationshipProperties.java | 4 +- .../spring-boot-dependencies/build.gradle | 1 + .../spring-boot-docs/build.gradle | 4 +- .../build.gradle | 3 +- .../build.gradle | 3 +- ....data.neo4j.AutoConfigureDataNeo4j.imports | 8 +- 41 files changed, 204 insertions(+), 351 deletions(-) delete mode 100644 spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java delete mode 100644 spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java create mode 100644 spring-boot-project/spring-boot-data-neo4j/build.gradle rename spring-boot-project/{spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/dockerTest/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jRepositoriesAutoConfigurationIntegrationTests.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jDataAutoConfiguration.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jDataProperties.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jReactiveDataAutoConfiguration.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jReactiveRepositoriesAutoConfiguration.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jReactiveRepositoriesRegistrar.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jRepositoriesAutoConfiguration.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jRepositoriesRegistrar.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure}/package-info.java (84%) create mode 100644 spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/additional-spring-configuration-metadata.json create mode 100644 spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure}/MockedDriverConfiguration.java (92%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jDataAutoConfigurationTests.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jReactiveDataAutoConfigurationTests.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jReactiveRepositoriesAutoConfigurationTests.java (85%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure}/Neo4jRepositoriesAutoConfigurationTests.java (86%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/city/City.java (88%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/city/CityRepository.java (87%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/city/ReactiveCityRepository.java (86%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/country/Country.java (90%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/country/CountryRepository.java (85%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/country/ReactiveCountryRepository.java (85%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/empty/EmptyMarker.java => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/empty/EmptyPackage.java} (79%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/scan/TestNode.java (87%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/scan/TestNonAnnotated.java (86%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/scan/TestPersistent.java (87%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j => spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain}/scan/TestRelationshipProperties.java (87%) diff --git a/settings.gradle b/settings.gradle index 2f339ec09d..110ea9b645 100644 --- a/settings.gradle +++ b/settings.gradle @@ -57,6 +57,7 @@ include "spring-boot-project:spring-boot-data-elasticsearch" include "spring-boot-project:spring-boot-data-jpa" include "spring-boot-project:spring-boot-data-ldap" include "spring-boot-project:spring-boot-data-mongodb" +include "spring-boot-project:spring-boot-data-neo4j" include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-docker-compose" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index fe705a6ceb..476cba5d1a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -25,6 +25,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-data-elasticsearch")) optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-data-mongodb")) + optional(project(":spring-boot-project:spring-boot-data-neo4j")) optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-http")) @@ -39,7 +40,6 @@ dependencies { optional(project(":spring-boot-project:spring-boot-liquibase")) optional(project(":spring-boot-project:spring-boot-mail")) optional(project(":spring-boot-project:spring-boot-mongodb")) - optional(project(":spring-boot-project:spring-boot-neo4j")) optional(project(":spring-boot-project:spring-boot-quartz")) optional(project(":spring-boot-project:spring-boot-r2dbc")) optional(project(":spring-boot-project:spring-boot-reactor-netty")) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java index ff6231f9cf..95aa41db28 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java @@ -24,8 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTraci import org.springframework.boot.actuate.health.HealthEndpointWebExtension; import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration; -import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration; @@ -35,6 +33,8 @@ import org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoCo import org.springframework.boot.data.elasticsearch.autoconfigure.ElasticsearchDataAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration; +import org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfiguration; +import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration; import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration; import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration; @@ -80,7 +80,7 @@ class WebEndpointsAutoConfigurationIntegrationTests { @EnableAutoConfiguration(exclude = { FlywayAutoConfiguration.class, LiquibaseAutoConfiguration.class, CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class, Neo4jDataAutoConfiguration.class, - Neo4jRepositoriesAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, + Neo4jReactiveDataAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class, RepositoryRestMvcAutoConfiguration.class, HazelcastAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class, RedisAutoConfiguration.class, diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 831d9e2343..85cec9617c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -36,7 +36,6 @@ dependencies { dockerTestImplementation("org.testcontainers:couchbase") dockerTestImplementation("org.testcontainers:junit-jupiter") dockerTestImplementation("org.testcontainers:mongodb") - dockerTestImplementation("org.testcontainers:neo4j") dockerTestImplementation("org.testcontainers:testcontainers") optional(project(":spring-boot-project:spring-boot-activemq")) @@ -53,7 +52,6 @@ dependencies { optional(project(":spring-boot-project:spring-boot-jsonb")) optional(project(":spring-boot-project:spring-boot-liquibase")) optional(project(":spring-boot-project:spring-boot-mongodb")) - optional(project(":spring-boot-project:spring-boot-neo4j")) optional(project(":spring-boot-project:spring-boot-r2dbc")) optional(project(":spring-boot-project:spring-boot-reactor-netty")) optional(project(":spring-boot-project:spring-boot-rsocket")) @@ -156,7 +154,6 @@ dependencies { optional("org.springframework.data:spring-data-rest-webmvc") optional("org.springframework.data:spring-data-jdbc") optional("org.springframework.data:spring-data-mongodb") - optional("org.springframework.data:spring-data-neo4j") optional("org.springframework.data:spring-data-r2dbc") optional("org.springframework.data:spring-data-redis") optional("org.springframework.graphql:spring-graphql") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 71353d1e2a..f95d8df158 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -38,84 +38,6 @@ "description": "Whether to enable JDBC repositories.", "defaultValue": true }, - { - "name": "spring.data.neo4j.auto-index", - "description": "Auto index mode.", - "defaultValue": "none", - "deprecation": { - "reason": "Automatic index creation is no longer supported.", - "level": "error" - } - }, - { - "name": "spring.data.neo4j.embedded.enabled", - "type": "java.lang.Boolean", - "description": "Whether to enable embedded mode if the embedded driver is available.", - "deprecation": { - "reason": "Embedded mode is no longer supported, please use Testcontainers instead.", - "level": "error" - } - }, - { - "name": "spring.data.neo4j.open-in-view", - "type": "java.lang.Boolean", - "description": "Register OpenSessionInViewInterceptor that binds a Neo4j Session to the thread for the entire processing of the request.", - "deprecation": { - "level": "error" - } - }, - { - "name": "spring.data.neo4j.password", - "type": "java.lang.String", - "description": "Login password of the server.", - "deprecation": { - "replacement": "spring.neo4j.authentication.password", - "level": "error" - } - }, - { - "name": "spring.data.neo4j.repositories.enabled", - "type": "java.lang.Boolean", - "description": "Whether to enable Neo4j repositories.", - "defaultValue": true, - "deprecation": { - "replacement": "spring.data.neo4j.repositories.type", - "level": "error" - } - }, - { - "name": "spring.data.neo4j.repositories.type", - "type": "org.springframework.boot.autoconfigure.data.RepositoryType", - "description": "Type of Neo4j repositories to enable.", - "defaultValue": "auto" - }, - { - "name": "spring.data.neo4j.uri", - "type": "java.lang.String", - "description": "URI used by the driver. Auto-detected by default.", - "deprecation": { - "replacement": "spring.neo4j.uri", - "level": "error" - } - }, - { - "name": "spring.data.neo4j.use-native-types", - "type": "java.lang.Boolean", - "description": "Whether to use Neo4j native types wherever possible.", - "deprecation": { - "reason": "Native type support is now built-in.", - "level": "error" - } - }, - { - "name": "spring.data.neo4j.username", - "type": "java.lang.String", - "description": "Login user of the server.", - "deprecation": { - "replacement": "spring.neo4j.authentication.username", - "level": "error" - } - }, { "name": "spring.data.r2dbc.repositories.enabled", "type": "java.lang.Boolean", diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 7441532036..8bf181d1b6 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -6,10 +6,6 @@ org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoC org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoConfiguration org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jReactiveDataAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jReactiveRepositoriesAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java deleted file mode 100644 index 2ce65424c0..0000000000 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/neo4j/CityNeo4jRepository.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.boot.autoconfigure.data.alt.neo4j; - -import org.springframework.boot.autoconfigure.data.neo4j.city.City; -import org.springframework.data.neo4j.repository.Neo4jRepository; - -public interface CityNeo4jRepository extends Neo4jRepository { - -} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java deleted file mode 100644 index 531a38edc5..0000000000 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MixedNeo4jRepositoriesAutoConfigurationTests.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright 2012-2025 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.boot.autoconfigure.data.neo4j; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.neo4j.driver.Config; -import org.neo4j.driver.Driver; -import org.neo4j.driver.GraphDatabase; -import org.neo4j.driver.internal.logging.Slf4jLogging; - -import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.data.alt.jpa.City; -import org.springframework.boot.autoconfigure.data.alt.jpa.CityJpaRepository; -import org.springframework.boot.autoconfigure.data.neo4j.country.Country; -import org.springframework.boot.autoconfigure.data.neo4j.country.CountryRepository; -import org.springframework.boot.autoconfigure.data.neo4j.empty.EmptyMarker; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.boot.data.jpa.autoconfigure.JpaRepositoriesAutoConfiguration; -import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; -import org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration; -import org.springframework.boot.test.util.TestPropertyValues; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.data.neo4j.config.AbstractNeo4jConfig; -import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link Neo4jRepositoriesAutoConfiguration}. - * - * @author Dave Syer - * @author Oliver Gierke - * @author Michael Hunger - * @author Vince Bickers - * @author Stephane Nicoll - * @author Michael J. Simons - */ -class MixedNeo4jRepositoriesAutoConfigurationTests { - - private AnnotationConfigApplicationContext context; - - @AfterEach - void close() { - if (this.context != null) { - this.context.close(); - } - } - - @Test - void testDefaultRepositoryConfiguration() { - load(TestConfiguration.class); - assertThat(this.context.getBean(CountryRepository.class)).isNotNull(); - } - - @Test - void testMixedRepositoryConfiguration() { - load(MixedConfiguration.class); - assertThat(this.context.getBean(CountryRepository.class)).isNotNull(); - assertThat(this.context.getBean(CityJpaRepository.class)).isNotNull(); - } - - @Test - void testJpaRepositoryConfigurationWithNeo4jTemplate() { - load(JpaConfiguration.class); - assertThat(this.context.getBean(CityJpaRepository.class)).isNotNull(); - } - - @Test - @Disabled - void testJpaRepositoryConfigurationWithNeo4jOverlap() { - load(OverlapConfiguration.class); - assertThat(this.context.getBean(CityJpaRepository.class)).isNotNull(); - } - - @Test - void testJpaRepositoryConfigurationWithNeo4jOverlapDisabled() { - load(OverlapConfiguration.class, "spring.data.neo4j.repositories.enabled:false"); - assertThat(this.context.getBean(CityJpaRepository.class)).isNotNull(); - } - - private void load(Class config, String... environment) { - AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); - TestPropertyValues.of(environment).applyTo(context); - context.register(config); - context.register(DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, - JpaRepositoriesAutoConfiguration.class, Neo4jDataAutoConfiguration.class, - Neo4jReactiveDataAutoConfiguration.class, Neo4jRepositoriesAutoConfiguration.class, - Neo4jReactiveRepositoriesAutoConfiguration.class); - context.refresh(); - this.context = context; - } - - @Configuration(proxyBeanMethods = false) - @TestAutoConfigurationPackage(EmptyMarker.class) - // Not this package or its parent - @EnableNeo4jRepositories(basePackageClasses = Country.class) - static class TestConfiguration extends AbstractNeo4jConfig { - - @Override - @Bean - public Driver driver() { - return GraphDatabase.driver("bolt://neo4j.test:7687", - Config.builder().withLogging(new Slf4jLogging()).build()); - } - - } - - @Configuration(proxyBeanMethods = false) - @TestAutoConfigurationPackage(EmptyMarker.class) - @EnableNeo4jRepositories(basePackageClasses = Country.class) - @EntityScan(basePackageClasses = City.class) - @EnableJpaRepositories(basePackageClasses = CityJpaRepository.class) - static class MixedConfiguration extends AbstractNeo4jConfig { - - @Override - @Bean - public Driver driver() { - return GraphDatabase.driver("bolt://neo4j.test:7687", - Config.builder().withLogging(new Slf4jLogging()).build()); - } - - } - - @Configuration(proxyBeanMethods = false) - @TestAutoConfigurationPackage(EmptyMarker.class) - @EntityScan(basePackageClasses = City.class) - @EnableJpaRepositories(basePackageClasses = CityJpaRepository.class) - static class JpaConfiguration { - - } - - // In this one the Jpa repositories and the auto-configuration packages overlap, so - // Neo4j will try and configure the same repositories - @Configuration(proxyBeanMethods = false) - @TestAutoConfigurationPackage(CityJpaRepository.class) - @EnableJpaRepositories(basePackageClasses = CityJpaRepository.class) - static class OverlapConfiguration { - - } - -} diff --git a/spring-boot-project/spring-boot-data-neo4j/build.gradle b/spring-boot-project/spring-boot-data-neo4j/build.gradle new file mode 100644 index 0000000000..4f7f25ee8c --- /dev/null +++ b/spring-boot-project/spring-boot-data-neo4j/build.gradle @@ -0,0 +1,33 @@ +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.docker-test" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot Data Neo4j" + +dependencies { + api(project(":spring-boot-project:spring-boot-neo4j")) + api(project(":spring-boot-project:spring-boot-tx")) + api("org.springframework.data:spring-data-neo4j") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional("io.projectreactor:reactor-core") + + dockerTestImplementation(project(":spring-boot-project:spring-boot-test")) + dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation("ch.qos.logback:logback-classic") + dockerTestImplementation("org.junit.jupiter:junit-jupiter") + dockerTestImplementation("org.testcontainers:neo4j") + dockerTestImplementation("org.testcontainers:junit-jupiter") + + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure"))) + testImplementation("io.projectreactor:reactor-test") + + testRuntimeOnly("ch.qos.logback:logback-classic") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-data-neo4j/src/dockerTest/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfigurationIntegrationTests.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java rename to spring-boot-project/spring-boot-data-neo4j/src/dockerTest/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfigurationIntegrationTests.java index b26123969f..8efdc09ac2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/dockerTest/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfigurationIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.junit.jupiter.api.Test; import org.testcontainers.containers.Neo4jContainer; @@ -23,7 +23,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.data.neo4j.country.CountryRepository; +import org.springframework.boot.data.neo4j.domain.country.CountryRepository; import org.springframework.boot.neo4j.autoconfigure.Neo4jAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataAutoConfiguration.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataAutoConfiguration.java index 476dcb8a8e..4cff81354f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import java.util.Set; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataProperties.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataProperties.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java index 100708347e..ecd3a621d1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataProperties.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfiguration.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveDataAutoConfiguration.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfiguration.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveDataAutoConfiguration.java index ff87b47d6f..b77f4946da 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveDataAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.neo4j.driver.Driver; import reactor.core.publisher.Flux; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfiguration.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesAutoConfiguration.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfiguration.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesAutoConfiguration.java index 693cdeecbd..0d23259d5f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.neo4j.driver.Driver; import reactor.core.publisher.Flux; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesRegistrar.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesRegistrar.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesRegistrar.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesRegistrar.java index ab2e1b2eaa..fbc16a15dd 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesRegistrar.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import java.lang.annotation.Annotation; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfiguration.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfiguration.java index 76d2ae2a3c..3b5ed08824 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.neo4j.driver.Driver; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesRegistrar.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesRegistrar.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesRegistrar.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesRegistrar.java index b263aae844..b6e0d1908a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesRegistrar.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import java.lang.annotation.Annotation; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/package-info.java b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java similarity index 84% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/package-info.java rename to spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java index 4a6a7a12db..b844b1a86a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/package-info.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/java/org/springframework/boot/data/neo4j/autoconfigure/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Auto-configuration for Spring Data Neo4j. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; diff --git a/spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000000..fcaa6e4afa --- /dev/null +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,83 @@ +{ + "groups": [], + "properties": [ + { + "name": "spring.data.neo4j.auto-index", + "description": "Auto index mode.", + "defaultValue": "none", + "deprecation": { + "reason": "Automatic index creation is no longer supported.", + "level": "error" + } + }, + { + "name": "spring.data.neo4j.embedded.enabled", + "type": "java.lang.Boolean", + "description": "Whether to enable embedded mode if the embedded driver is available.", + "deprecation": { + "reason": "Embedded mode is no longer supported, please use Testcontainers instead.", + "level": "error" + } + }, + { + "name": "spring.data.neo4j.open-in-view", + "type": "java.lang.Boolean", + "description": "Register OpenSessionInViewInterceptor that binds a Neo4j Session to the thread for the entire processing of the request.", + "deprecation": { + "level": "error" + } + }, + { + "name": "spring.data.neo4j.password", + "type": "java.lang.String", + "description": "Login password of the server.", + "deprecation": { + "replacement": "spring.neo4j.authentication.password", + "level": "error" + } + }, + { + "name": "spring.data.neo4j.repositories.enabled", + "type": "java.lang.Boolean", + "description": "Whether to enable Neo4j repositories.", + "defaultValue": true, + "deprecation": { + "replacement": "spring.data.neo4j.repositories.type", + "level": "error" + } + }, + { + "name": "spring.data.neo4j.repositories.type", + "type": "org.springframework.boot.autoconfigure.data.RepositoryType", + "description": "Type of Neo4j repositories to enable.", + "defaultValue": "auto" + }, + { + "name": "spring.data.neo4j.uri", + "type": "java.lang.String", + "description": "URI used by the driver. Auto-detected by default.", + "deprecation": { + "replacement": "spring.neo4j.uri", + "level": "error" + } + }, + { + "name": "spring.data.neo4j.use-native-types", + "type": "java.lang.Boolean", + "description": "Whether to use Neo4j native types wherever possible.", + "deprecation": { + "reason": "Native type support is now built-in.", + "level": "error" + } + }, + { + "name": "spring.data.neo4j.username", + "type": "java.lang.String", + "description": "Login user of the server.", + "deprecation": { + "replacement": "spring.neo4j.authentication.username", + "level": "error" + } + } + ] +} diff --git a/spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..95f5116fe7 --- /dev/null +++ b/spring-boot-project/spring-boot-data-neo4j/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,4 @@ +org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveRepositoriesAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jRepositoriesAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/MockedDriverConfiguration.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/MockedDriverConfiguration.java index 06e4a3770d..8dafe51a9a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/MockedDriverConfiguration.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/MockedDriverConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.mockito.ArgumentMatchers; import org.neo4j.driver.Driver; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataAutoConfigurationTests.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataAutoConfigurationTests.java index daf5508317..5ace33d5b3 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jDataAutoConfigurationTests.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.junit.jupiter.api.Test; import org.neo4j.driver.Driver; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestNode; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestNonAnnotated; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestPersistent; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestRelationshipProperties; +import org.springframework.boot.data.neo4j.domain.scan.TestNode; +import org.springframework.boot.data.neo4j.domain.scan.TestNonAnnotated; +import org.springframework.boot.data.neo4j.domain.scan.TestPersistent; +import org.springframework.boot.data.neo4j.domain.scan.TestRelationshipProperties; import org.springframework.boot.neo4j.autoconfigure.Neo4jAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveDataAutoConfigurationTests.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveDataAutoConfigurationTests.java index fcb2c19a67..81a09d41eb 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveDataAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.junit.jupiter.api.Test; import org.neo4j.driver.Driver; @@ -23,10 +23,10 @@ import reactor.test.StepVerifier; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestNode; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestNonAnnotated; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestPersistent; -import org.springframework.boot.autoconfigure.data.neo4j.scan.TestRelationshipProperties; +import org.springframework.boot.data.neo4j.domain.scan.TestNode; +import org.springframework.boot.data.neo4j.domain.scan.TestNonAnnotated; +import org.springframework.boot.data.neo4j.domain.scan.TestPersistent; +import org.springframework.boot.data.neo4j.domain.scan.TestRelationshipProperties; import org.springframework.boot.neo4j.autoconfigure.Neo4jAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesAutoConfigurationTests.java similarity index 85% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesAutoConfigurationTests.java index 3946180313..735748cd6c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jReactiveRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jReactiveRepositoriesAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,18 +14,18 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage; -import org.springframework.boot.autoconfigure.data.neo4j.city.City; -import org.springframework.boot.autoconfigure.data.neo4j.city.CityRepository; -import org.springframework.boot.autoconfigure.data.neo4j.city.ReactiveCityRepository; -import org.springframework.boot.autoconfigure.data.neo4j.country.CountryRepository; -import org.springframework.boot.autoconfigure.data.neo4j.country.ReactiveCountryRepository; +import org.springframework.boot.data.neo4j.domain.city.City; +import org.springframework.boot.data.neo4j.domain.city.CityRepository; +import org.springframework.boot.data.neo4j.domain.city.ReactiveCityRepository; +import org.springframework.boot.data.neo4j.domain.country.CountryRepository; +import org.springframework.boot.data.neo4j.domain.country.ReactiveCountryRepository; +import org.springframework.boot.data.neo4j.domain.empty.EmptyPackage; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Configuration; import org.springframework.data.neo4j.core.ReactiveNeo4jTemplate; @@ -93,7 +93,7 @@ class Neo4jReactiveRepositoriesAutoConfigurationTests { } @Configuration(proxyBeanMethods = false) - @TestAutoConfigurationPackage(EmptyDataPackage.class) + @TestAutoConfigurationPackage(EmptyPackage.class) static class EmptyConfiguration { } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfigurationTests.java similarity index 86% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfigurationTests.java index 7b187ff14e..bb509dcba8 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/autoconfigure/Neo4jRepositoriesAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,18 +14,18 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j; +package org.springframework.boot.data.neo4j.autoconfigure; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage; -import org.springframework.boot.autoconfigure.data.neo4j.city.City; -import org.springframework.boot.autoconfigure.data.neo4j.city.CityRepository; -import org.springframework.boot.autoconfigure.data.neo4j.city.ReactiveCityRepository; -import org.springframework.boot.autoconfigure.data.neo4j.country.CountryRepository; -import org.springframework.boot.autoconfigure.data.neo4j.country.ReactiveCountryRepository; +import org.springframework.boot.data.neo4j.domain.city.City; +import org.springframework.boot.data.neo4j.domain.city.CityRepository; +import org.springframework.boot.data.neo4j.domain.city.ReactiveCityRepository; +import org.springframework.boot.data.neo4j.domain.country.CountryRepository; +import org.springframework.boot.data.neo4j.domain.country.ReactiveCountryRepository; +import org.springframework.boot.data.neo4j.domain.empty.EmptyPackage; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -113,7 +113,7 @@ class Neo4jRepositoriesAutoConfigurationTests { } @Configuration(proxyBeanMethods = false) - @TestAutoConfigurationPackage(EmptyDataPackage.class) + @TestAutoConfigurationPackage(EmptyPackage.class) static class EmptyConfiguration { } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/City.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/City.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/City.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/City.java index 813197f7d5..a122af99db 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/City.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/City.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.city; +package org.springframework.boot.data.neo4j.domain.city; import java.io.Serializable; -import org.springframework.boot.autoconfigure.data.neo4j.country.Country; +import org.springframework.boot.data.neo4j.domain.country.Country; import org.springframework.data.neo4j.core.schema.GeneratedValue; import org.springframework.data.neo4j.core.schema.Id; import org.springframework.data.neo4j.core.schema.Node; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/CityRepository.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/CityRepository.java index 1aac17c0c1..71356fb611 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/CityRepository.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/CityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.city; +package org.springframework.boot.data.neo4j.domain.city; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/ReactiveCityRepository.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/ReactiveCityRepository.java similarity index 86% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/ReactiveCityRepository.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/ReactiveCityRepository.java index 8b88301d5a..675cdd2c7e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/city/ReactiveCityRepository.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/city/ReactiveCityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.city; +package org.springframework.boot.data.neo4j.domain.city; import org.springframework.data.neo4j.repository.ReactiveNeo4jRepository; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/Country.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/Country.java similarity index 90% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/Country.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/Country.java index 04d23af4b4..044097a2df 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/Country.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/Country.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.country; +package org.springframework.boot.data.neo4j.domain.country; import java.io.Serializable; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/CountryRepository.java similarity index 85% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/CountryRepository.java index d440e90a93..f41724d9a0 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/CountryRepository.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/CountryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.country; +package org.springframework.boot.data.neo4j.domain.country; import org.springframework.data.neo4j.repository.Neo4jRepository; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/ReactiveCountryRepository.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/ReactiveCountryRepository.java similarity index 85% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/ReactiveCountryRepository.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/ReactiveCountryRepository.java index c97759cadc..1510a582db 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/country/ReactiveCountryRepository.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/country/ReactiveCountryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.country; +package org.springframework.boot.data.neo4j.domain.country; import org.springframework.data.neo4j.repository.ReactiveNeo4jRepository; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/empty/EmptyMarker.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/empty/EmptyPackage.java similarity index 79% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/empty/EmptyMarker.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/empty/EmptyPackage.java index 9156f4755b..05f9a3cd72 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/empty/EmptyMarker.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/empty/EmptyPackage.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -14,8 +14,8 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.empty; +package org.springframework.boot.data.neo4j.domain.empty; -public class EmptyMarker { +public class EmptyPackage { } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestNode.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestNode.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestNode.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestNode.java index 50293f98b8..34e8e6e68e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestNode.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.scan; +package org.springframework.boot.data.neo4j.domain.scan; import org.springframework.data.neo4j.core.schema.GeneratedValue; import org.springframework.data.neo4j.core.schema.Id; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestNonAnnotated.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestNonAnnotated.java similarity index 86% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestNonAnnotated.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestNonAnnotated.java index c754c38775..bdc5cdd49f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestNonAnnotated.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestNonAnnotated.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.scan; +package org.springframework.boot.data.neo4j.domain.scan; import org.springframework.data.neo4j.core.schema.GeneratedValue; import org.springframework.data.neo4j.core.schema.Id; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestPersistent.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestPersistent.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestPersistent.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestPersistent.java index 54aee30b7b..bdd1348994 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestPersistent.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestPersistent.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.scan; +package org.springframework.boot.data.neo4j.domain.scan; import org.springframework.data.annotation.Persistent; import org.springframework.data.neo4j.core.schema.GeneratedValue; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestRelationshipProperties.java b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestRelationshipProperties.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestRelationshipProperties.java rename to spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestRelationshipProperties.java index 872742da88..faaf075b87 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/scan/TestRelationshipProperties.java +++ b/spring-boot-project/spring-boot-data-neo4j/src/test/java/org/springframework/boot/data/neo4j/domain/scan/TestRelationshipProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.data.neo4j.scan; +package org.springframework.boot.data.neo4j.domain.scan; import org.springframework.data.neo4j.core.schema.GeneratedValue; import org.springframework.data.neo4j.core.schema.Id; diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 1c56efa765..4eac5f2889 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1992,6 +1992,7 @@ bom { "spring-boot-data-jpa", "spring-boot-data-ldap", "spring-boot-data-mongodb", + "spring-boot-data-neo4j", "spring-boot-devtools", "spring-boot-docker-compose", "spring-boot-elasticsearch", diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index f9624871df..f20f40ccdd 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -73,6 +73,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-mongodb", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata")) @@ -127,6 +128,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-data-elasticsearch", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata")) @@ -175,6 +177,7 @@ dependencies { implementation(project(path: ":spring-boot-project:spring-boot-autoconfigure-all")) implementation(project(path: ":spring-boot-project:spring-boot-data-cassandra")) implementation(project(path: ":spring-boot-project:spring-boot-data-elasticsearch")) + implementation(project(path: ":spring-boot-project:spring-boot-data-neo4j")) implementation(project(path: ":spring-boot-project:spring-boot-devtools")) implementation(project(path: ":spring-boot-project:spring-boot-docker-compose")) implementation(project(path: ":spring-boot-project:spring-boot-http")) @@ -255,7 +258,6 @@ dependencies { implementation("org.springframework.data:spring-data-jpa") implementation("org.springframework.data:spring-data-ldap") implementation("org.springframework.data:spring-data-mongodb") - implementation("org.springframework.data:spring-data-neo4j") implementation("org.springframework.data:spring-data-redis") implementation("org.springframework.data:spring-data-r2dbc") implementation("org.springframework.graphql:spring-graphql") diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-neo4j/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-neo4j/build.gradle index a53920a594..c5bfc7e1c4 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-neo4j/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-neo4j/build.gradle @@ -6,6 +6,5 @@ description = "Starter for using Neo4j graph database and Spring Data Neo4j" dependencies { api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) - api(project(":spring-boot-project:spring-boot-tx")) - api("org.springframework.data:spring-data-neo4j") + api(project(":spring-boot-project:spring-boot-data-neo4j")) } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index 22a0e746fe..83f258e60f 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -42,6 +42,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-data-ldap")) optional(project(":spring-boot-project:spring-boot-data-mongodb")) + optional(project(":spring-boot-project:spring-boot-data-neo4j")) optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-groovy-templates")) optional(project(":spring-boot-project:spring-boot-hateoas")) @@ -54,7 +55,6 @@ dependencies { exclude(group: "org.liquibase") } optional(project(":spring-boot-project:spring-boot-mongodb")) - optional(project(":spring-boot-project:spring-boot-neo4j")) optional(project(":spring-boot-project:spring-boot-r2dbc")) optional(project(":spring-boot-project:spring-boot-reactor-netty")) optional(project(":spring-boot-project:spring-boot-tx")) @@ -84,7 +84,6 @@ dependencies { optional("org.springframework.data:spring-data-jpa") optional("org.springframework.data:spring-data-ldap") optional("org.springframework.data:spring-data-mongodb") - optional("org.springframework.data:spring-data-neo4j") optional("org.springframework.data:spring-data-r2dbc") optional("org.springframework.data:spring-data-redis") optional("org.springframework.graphql:spring-graphql-test") diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.neo4j.AutoConfigureDataNeo4j.imports b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.neo4j.AutoConfigureDataNeo4j.imports index 027f786c48..53828c04f7 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.neo4j.AutoConfigureDataNeo4j.imports +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.neo4j.AutoConfigureDataNeo4j.imports @@ -1,8 +1,8 @@ # AutoConfigureDataNeo4j auto-configuration imports org.springframework.boot.neo4j.autoconfigure.Neo4jAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jReactiveDataAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jReactiveRepositoriesAutoConfiguration -org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveRepositoriesAutoConfiguration +org.springframework.boot.data.neo4j.autoconfigure.Neo4jRepositoriesAutoConfiguration org.springframework.boot.transaction.autoconfigure.TransactionAutoConfiguration optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration