I followed https://github.com/graphaware/neo4j-uuid link to generate UUID for each and every neo4j node which gets created from Spring boot application. Here is the list of steps I followed as per the link:
Added
graphaware-uuid-3.3.3.52.16.jar
file to\plugins
folder of Neo4jDB.
In my caseC:\Users\Naveen\AppData\Roaming\Neo4j Desktop\Application\neo4jDatabases\database-***\installation-3.3.2\plugins
Added following configurations to \conf\neo4j.conf file
com.graphaware.runtime.enabled=true com.graphaware.module.UIDM.1=com.graphaware.module.uuid.UuidBootstrapper com.graphaware.module.UUID.uuidGeneratorClass=com.graphaware.module.uuid.generator.SequenceIdGenerator
Created Model class in spring boot application
@NodeEntity public class Skill { @GraphId private Long graphId; @Property(name = "uuid") private Long uuid; @Property(name = "skillName") private String skillName; //...getters and setters }
Created Spring Neo4j Data repository interface
public interface SkillRepository extends GraphRepository<Skill> { }
Started Neo4j DB and loaded Spring context and tested the configurations:
public Skill createkill() { Skill skill = new Skill(); skill.setSkillName("Java"); skill = skillRepository.save(skill); return skill; }
Issue: Node is getting created in Neo4j DB with graphId
property populating automatically, but uuid
property is not populated. The returned Skill object is holding null value for uuid
property.
I checked Graphaware Framework and UUID not starting on Neo4j GrapheneDB and GraphAware UUID not generating links but couldn't find any solution for my problem.
Please help out to know what I am doing wrong or if I am missing anything.
Or suggest any alternate uuid
generation solution.
Version details of libraries and tools used:
Java 1.8.0_131
Neo4J 3.3.2 Enterprise
graphaware-uuid-3.3.3.52.16.jar
Spring boot 1.5.10