DATAGRAPH-1151 - Remove usages of Commons Lang, IO and OGM Api.

# Conflicts:
#	spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repository/MultipleSessionFactorySupportTests.java
This commit is contained in:
Michael J. Simons
2018-11-19 16:29:35 +01:00
parent de2df3ebac
commit 6310bac96b
3 changed files with 16 additions and 11 deletions

View File

@@ -165,6 +165,12 @@
<version>${neo4j.ogm.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-api</artifactId>
<version>${neo4j.ogm.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-bolt-driver</artifactId>

View File

@@ -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 +
'}';
}
}

View File

@@ -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");
}
}
}