How can you customise self, parent, children links in spring data rest with neo4j

后端 未结 1 1449
南笙
南笙 2021-01-22 15:03

I am using spring data rest to create an API over neo4j. I don\'t want to expose nodeId in my URLs, therefore I have a UUID instead. More info on here:

How can I change

相关标签:
1条回答
  • 2021-01-22 15:41

    Spring Data REST has a BackendIdConverter SPI interface for you implement to translate what's discovered as the identifying part of the URI into whatever you're using in the repository's findOne(…) method.

    Simply create an implementation of this interface that does the two-way conversion and register it as Spring bean in your ApplicationContext and it will be picked up by Spring Data REST automatically.

    0 讨论(0)
提交回复
热议问题