spring-data-neo4j

Spring data neo4j aspectJ setup error

痴心易碎 提交于 2019-12-06 11:21:48
问题 I can setup spring data and neo4j in STS but I would like to also take advantage of the aspectJ capabilities provided by Spring data. I have checked and used the Cineasts example as a helper example but it seems that I cannot setup correctly my project, the steps I do are: Create new maven application. Add the provided addons on pom.xml. The problem I am facing is that in every class in my project at the package declaration there is an error that states can't determine annotations of missing

Unable to find neo4j-cypher-dsl version 1.9.M04 anywhere

时间秒杀一切 提交于 2019-12-06 09:30:30
org.springframework.data:spring-data-neo4j:2.2.1.RELEASE depends on neo4j-cypher-dsl:org.neo4j:1.9.M04 but I am unable to find this dsl artifact in any public mvn repositories. Any idea on where to get this jar? Found this in neo4j repo here http://m2.neo4j.org/content/repositories/releases/org/neo4j/neo4j-cypher-dsl/1.9.M04/ 来源: https://stackoverflow.com/questions/16653128/unable-to-find-neo4j-cypher-dsl-version-1-9-m04-anywhere

Layered architecture and persistence annotations on the model beans?

给你一囗甜甜゛ 提交于 2019-12-06 06:51:34
问题 I would like to follow the separation of concerns design principle in a new Java EE web app. If I understand correctly, this means that I have to keep the technical choices of my DAL (Data Access Layer) invisible from my model/business layer. As I use Spring Data Neo4j, I must annotate my model beans with e.g. "@NodeEntity", an annotation which is specific to Spring Data Neo4J. This seems to mix the model layer with the Data Access Layer. Is this a good analysis I'm doing here? If so, how can

Neo4j slow creation method [closed]

余生颓废 提交于 2019-12-06 02:38:15
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . In my Neo4j/Neo4j Spring Data application I have a following entities: VoteGroup contains relationships VOTED_ON and VOTED_FOR to entities Criterion and Decision and list of Vote @NodeEntity public class VoteGroup extends BaseEntity { private static final String VOTED_ON = "VOTED_ON"; private final static String VOTED_FOR = "VOTED_FOR"; private final static String CONTAINS = "CONTAINS"; @GraphId private Long id;

neo4j - Relationship between three nodes

こ雲淡風輕ζ 提交于 2019-12-05 21:50:52
I'm totally new to Neo4j and I'm testing it in these days. One issue I have with it is how to correctly implement a relationship which involves 3 different nodes using Spring Data . Suppose, for example, that I have 3 @NodeEntity s: User , Tag and TaggableObject . As you can argue, a User can add a Tag to a TaggableObject ; I model this operation with a @RelationshipEntity TaggingOperation . However, I can't find a simple way to glue the 3 entities inside the relationship. I mean, the obvious choice is to set @StartNode User tagger and @EndNode TaggedObject taggedObject ; but how can I also

LocalDateTime is not converted to String but to Json object

大憨熊 提交于 2019-12-05 21:11:30
I want to serialize a creation date of type java.time.LocalDateTime as String, when calling a spring-data-rest service. The field of the entity is annotated with DateTimeFormat(iso=ISO.DATE_TIME). I also registered a LocalData to String Converter in the Spring Configuration class. @Override @Bean protected ConversionService neo4jConversionService() throws Exception { ConversionService conversionService = super.neo4jConversionService(); ConverterRegistry registry = (ConverterRegistry) conversionService; registry.removeConvertible(LocalDateTime.class, String.class); registry.removeConvertible

@Query shortestPath return type in Spring Data Neo4j

不羁岁月 提交于 2019-12-05 18:54:15
What's the return Type of the following query and how do I use it? I tried several things like Path , Iterable<Path> , and others but I always hit some sort of exceptions. It seems to be a LinkedHashMap but are there any other handier object types that I can use? @Query( "START u1=node:User(key= {0}), u2=node:User(key = {1}) " + "MATCH p = shortestPath(u1-[*]-u2) " + "RETURN p") public ??? findShortestPath(String u1, String u2); Am I missing any dependencies? This is the only one that I'm using: <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j-rest<

DynamicProperties in Spring Data Neo4j 4

笑着哭i 提交于 2019-12-05 12:37:24
I'm using DynamicProperties of Spring Data Neo4j 3.x. I'm missing this class in Spring Data Neo4j 4.0.0.M1 (SDN4). I there a new concept in SDN4 to store dynamic property values? A DynamicProperties property on a @NodeEntity stores all its properties dynamically on the underlying node itself. The key/value pairs of the DynamicProperties member are stored on the node with the keys prefixed with the property name that is returned by DelegatingFieldAccessorFactory#getNeo4jPropertyName(Field) . NodeEntity class Person { String name; DynamicProperties personalProperties = new

Passing optional parameters to @Query of a Spring Data Repository method

自闭症网瘾萝莉.ら 提交于 2019-12-05 10:58:52
I work with Spring Data and Neo4j in my current project and have the following situation: @RestController @RequestMapping(value = SearchResource.URI) public class PersonResource { public static final String URI = "/person"; @Autowired PersonRepository personRepository; @GetMapping public Collection<Person> findPersons( @RequestParam(value = "name", required = false) String name, @RequestParam(value = "birthDate", required = false) Long birthDate, @RequestParam(value = "town", required = false) Spring town) { Collection<Person> persons; if (name != null && birthDate == null && town == null) {

How can I use the webadmin interface with an embedded Neo4j 2.0 instance?

我的梦境 提交于 2019-12-05 09:59:46
I have a project which has been running with an embedded Neo4j 1.8.2 plus web admin interface. Now I updated the project to run with the latest Neo4j 2.0.1. Although there were some obstacles during that course (as I'm utilizing Spring Data Neo4j) in the end everything went smooth. But currently I'm stuck in getting the web admin running with it. Any advise would be highly appreciated. Here's my config which I was using for the 1.8 version (class for configuration referenced in the snippets) package com.example; import org.apache.commons.configuration.Configuration; import org.apache.commons