Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Commit

Permalink
upgrade spring data commons to 2.1.0.RELEASE, resolve #190. (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: Pan Li <[email protected]>
  • Loading branch information
Incarnation-p-lee authored Dec 19, 2018
1 parent 49dd547 commit cc0b38f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<spring.springframework.version>5.0.1.RELEASE</spring.springframework.version>
<spring.data.version>2.0.7.RELEASE</spring.data.version>
<spring.springframework.version>5.1.0.RELEASE</spring.springframework.version>
<spring.data.version>2.1.0.RELEASE</spring.data.version>
<spring.boot.test.version>2.0.4.RELEASE</spring.boot.test.version>

<org.apache.tinkerpop.gremlin.driver.version>3.2.4</org.apache.tinkerpop.gremlin.driver.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
package com.microsoft.spring.data.gremlin.mapping;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.data.mapping.context.AbstractMappingContext;
import org.springframework.data.mapping.model.Property;
import org.springframework.data.mapping.model.SimpleTypeHolder;
import org.springframework.data.util.TypeInformation;

public class GremlinMappingContext
extends AbstractMappingContext<BasicGremlinPersistentEntity<?>, GremlinPersistentProperty>
implements ApplicationContextAware {
extends AbstractMappingContext<BasicGremlinPersistentEntity<?>, GremlinPersistentProperty> {
private ApplicationContext context;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import org.springframework.data.repository.core.RepositoryInformation;
import org.springframework.data.repository.core.RepositoryMetadata;
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
import org.springframework.data.repository.query.EvaluationContextProvider;
import org.springframework.data.repository.query.QueryLookupStrategy;
import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider;
import org.springframework.data.repository.query.RepositoryQuery;
import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
Expand Down Expand Up @@ -53,8 +53,8 @@ public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> domainClas
}

@Override
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(QueryLookupStrategy.Key key,
EvaluationContextProvider provider) {
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(
QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider provider) {
return Optional.of(new GremlinQueryLookupStrategy(this.operations));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.data.repository.core.EntityInformation;
import org.springframework.data.repository.query.ExtensionAwareEvaluationContextProvider;
import org.springframework.data.repository.query.QueryLookupStrategy;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

Expand Down Expand Up @@ -52,8 +51,8 @@ public void testGetEntityInformation() {

@Test
public void testGetQueryLookupStrategy() {
final Optional<QueryLookupStrategy> strategyOptional = this.factory.getQueryLookupStrategy(
QueryLookupStrategy.Key.CREATE, new ExtensionAwareEvaluationContextProvider());
final Optional<QueryLookupStrategy> strategyOptional = this.factory.
getQueryLookupStrategy(QueryLookupStrategy.Key.CREATE, null);

Assert.assertTrue(strategyOptional.isPresent());
}
Expand Down

0 comments on commit cc0b38f

Please sign in to comment.