spring-batch-extensions
spring-batch-extensions copied to clipboard
Update Neo4j extension to use Spring Data Neo4j.
This is a rather large PR because it will remove the Neo4j-OGM dependency and replace it with the Spring Data Neo4j.
Some background information to clarify the situation:
The official Spring Data Neo4j was rewritten a few years ago to not depend on Neo4j-OGM anymore (in Spring Boot version since 2.4).
This current (old) implementation is based on the fact that the Spring Boot starter still brings Neo4j-OGM as a dependency and makes use of the configured SessionFactory
instance, that does not exist anymore.
Pros: No need to specify the query parts anymore but only one query/statement based on the Neo4j Cypher-DSL (https://github.com/neo4j-contrib/cypher-dsl) for readers
Cons: The writer needs now, instead of the single SessionFactory
,
- the
Neo4jMappingContext
to have knowledge about the entities - the
Neo4jTemplate
for loading and mapping entities - the
(Neo4j)Driver
for the simple delete operations.
While changing the mapping layer component, I decided also to upgrade all other dependencies to latest.