diff --git a/spring-data-neo4j/pom.xml b/spring-data-neo4j/pom.xml index ea6437e26..77df067f8 100644 --- a/spring-data-neo4j/pom.xml +++ b/spring-data-neo4j/pom.xml @@ -165,6 +165,12 @@ ${neo4j.ogm.version} + + org.neo4j + neo4j-ogm-api + ${neo4j.ogm.version} + + org.neo4j neo4j-ogm-bolt-driver diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/examples/movies/domain/queryresult/UserQueryResult.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/examples/movies/domain/queryresult/UserQueryResult.java index 3428a392b..9a856f1bf 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/examples/movies/domain/queryresult/UserQueryResult.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/examples/movies/domain/queryresult/UserQueryResult.java @@ -1,5 +1,5 @@ /* - * Copyright (c) [2011-2016] "Pivotal Software, Inc." / "Neo Technology" / "Graph Aware Ltd." + * Copyright (c) [2011-2018] "Pivotal Software, Inc." / "Neo Technology" / "Graph Aware Ltd." * * This product is licensed to you under the Apache License, Version 2.0 (the "License"). * You may not use this product except in compliance with the License. @@ -13,7 +13,6 @@ package org.springframework.data.neo4j.examples.movies.domain.queryresult; -import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.neo4j.ogm.annotation.Property; import org.springframework.data.neo4j.annotation.QueryResult; import org.springframework.data.neo4j.examples.movies.repo.UserRepository; @@ -86,7 +85,11 @@ public class UserQueryResult { @Override public String toString() { - return ReflectionToStringBuilder.toString(this); + return "UserQueryResult{" + + "id=" + id + + ", userId=" + userId + + ", userName='" + userName + '\'' + + ", age=" + age + + '}'; } - } diff --git a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/namedquery/NamedQueryTests.java b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/namedquery/NamedQueryTests.java index 00acdaa65..70a04b510 100644 --- a/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/namedquery/NamedQueryTests.java +++ b/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/namedquery/NamedQueryTests.java @@ -4,12 +4,12 @@ import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; -import org.neo4j.ogm.config.Configuration; import org.neo4j.ogm.session.SessionFactory; import org.neo4j.ogm.testutil.MultiDriverTestClass; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; import org.springframework.data.neo4j.namedquery.domain.SampleEntityForNamedQuery; import org.springframework.data.neo4j.namedquery.repo.SampleEntityForNamedQueryRepository; import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories; @@ -67,7 +67,7 @@ public class NamedQueryTests extends MultiDriverTestClass { repository.save(entity); } - @org.springframework.context.annotation.Configuration + @Configuration @ComponentScan({ "org.springframework.data.neo4j.namedquery" }) @EnableNeo4jRepositories(value = "org.springframework.data.neo4j.namedquery.repo") @EnableTransactionManagement @@ -80,11 +80,7 @@ public class NamedQueryTests extends MultiDriverTestClass { @Bean public SessionFactory sessionFactory() { - Configuration.Builder builder = getBaseConfiguration(); - - Configuration configuration = builder.build(); - - return new SessionFactory(configuration, "org.springframework.data.neo4j.namedquery.domain"); + return new SessionFactory("org.springframework.data.neo4j.namedquery.domain"); } } }