File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
src/main/java/movies/spring/data/neo4j Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11package movies .spring .data .neo4j ;
22
3- import org .neo4j .cypherdsl .core .Cypher ;
43import org .neo4j .cypherdsl .core .renderer .Dialect ;
5- import org .neo4j .cypherdsl .core .renderer .Renderer ;
64import org .springframework .beans .factory .annotation .Value ;
75import org .springframework .context .annotation .Bean ;
86import 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}
You can’t perform that action at this time.
0 commit comments