Create spring-boot-data-neo4j module

Closes gh-46124
This commit is contained in:
Andy Wilkinson 2025-04-23 10:48:51 +01:00
parent 796aefa232
commit e3bb0c144c
41 changed files with 202 additions and 332 deletions

View File

@ -73,6 +73,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"

View File

@ -41,6 +41,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"))
@ -55,7 +56,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"))

View File

@ -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,

View File

@ -53,7 +53,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"))
@ -70,7 +69,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"))
@ -173,7 +171,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")

View File

@ -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",

View File

@ -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

View File

@ -1,24 +0,0 @@
/*
* Copyright 2012-present 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<City, Long> {
}

View File

@ -1,160 +0,0 @@
/*
* Copyright 2012-present 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 {
}
}

View File

@ -0,0 +1,50 @@
/*
* Copyright 2012-present 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.
*/
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")
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -17,4 +17,4 @@
/**
* Auto-configuration for Spring Data Neo4j.
*/
package org.springframework.boot.autoconfigure.data.neo4j;
package org.springframework.boot.data.neo4j.autoconfigure;

View File

@ -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"
}
}
]
}

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -2001,6 +2001,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",

View File

@ -89,6 +89,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"))
@ -143,6 +144,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"))
@ -191,6 +193,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"))
@ -271,7 +274,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")

View File

@ -22,6 +22,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"))
}

View File

@ -59,6 +59,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"))
@ -71,7 +72,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"))
@ -101,7 +101,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")

View File

@ -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