From 9ee07c3f4b3119d0c881b0d734e9a8bf540299dd Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 13 Jan 2026 12:06:57 +0000 Subject: [PATCH] Adapt to breaking change in Spring Data Neo4j This is a follow-on from 9239447. A recent change [1] in Spring Data Neo4j require us to configure the use of an older dialect as we're testing with Neo4j 4 and the default dialect now requires Neo4j 5. See gh-48708 [1] https://github.com/spring-projects/spring-data-neo4j/commit/f2d7ba731416dc0c03d791839fd88335649a2dcc --- .../data/neo4j/ExampleNeo4jApplication.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/dockerTest/java/org/springframework/boot/test/autoconfigure/data/neo4j/ExampleNeo4jApplication.java b/spring-boot-project/spring-boot-test-autoconfigure/src/dockerTest/java/org/springframework/boot/test/autoconfigure/data/neo4j/ExampleNeo4jApplication.java index 90e7eac4202..5e8f12dae9a 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/dockerTest/java/org/springframework/boot/test/autoconfigure/data/neo4j/ExampleNeo4jApplication.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/dockerTest/java/org/springframework/boot/test/autoconfigure/data/neo4j/ExampleNeo4jApplication.java @@ -16,7 +16,11 @@ package org.springframework.boot.test.autoconfigure.data.neo4j; +import org.neo4j.cypherdsl.core.renderer.Configuration; +import org.neo4j.cypherdsl.core.renderer.Dialect; + import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; /** * Example {@link SpringBootApplication @SpringBootApplication} used with @@ -27,4 +31,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ExampleNeo4jApplication { + @Bean + Configuration cypherDslConfiguration() { + return Configuration.newConfig().withDialect(Dialect.NEO4J_4).build(); + } + }