Skip to content

Commit 7d82a76

Browse files
committed
Upgrade to latest Spring Boot
1 parent 5e06119 commit 7d82a76

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.2.2</version>
8+
<version>3.5.7</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111

src/main/java/movies/spring/data/neo4j/DatabaseConfig.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package movies.spring.data.neo4j;
22

3-
import org.neo4j.cypherdsl.core.Cypher;
43
import org.neo4j.cypherdsl.core.renderer.Dialect;
5-
import org.neo4j.cypherdsl.core.renderer.Renderer;
64
import org.springframework.beans.factory.annotation.Value;
75
import org.springframework.context.annotation.Bean;
86
import org.springframework.context.annotation.Configuration;
@@ -28,25 +26,13 @@ public class DatabaseConfig {
2826
*/
2927
@Bean
3028
DatabaseSelectionProvider databaseSelectionProvider(@Value("${spring.data.neo4j.database}") String database) {
31-
return () -> {
32-
String neo4jVersion = System.getenv("NEO4J_VERSION");
33-
if (neo4jVersion == null || (neo4jVersion.startsWith("4") || neo4jVersion.startsWith("5"))) {
34-
return DatabaseSelection.byName(database);
35-
}
36-
return DatabaseSelection.undecided();
37-
};
29+
return () -> DatabaseSelection.byName(database);
3830
}
3931

4032
@Bean
4133
org.neo4j.cypherdsl.core.renderer.Configuration cypherDslConfiguration() {
4234

43-
var dialect = Dialect.DEFAULT;
44-
String neo4jVersion = System.getenv("NEO4J_VERSION");
45-
if (neo4jVersion == null || neo4jVersion.startsWith("5")) {
46-
dialect = Dialect.NEO4J_5;
47-
}
48-
4935
return org.neo4j.cypherdsl.core.renderer.Configuration.newConfig()
50-
.withDialect(dialect).build();
36+
.withDialect(Dialect.NEO4J_5).build();
5137
}
5238
}

0 commit comments

Comments
 (0)