sebastiandaschner blog
Neo4j OGM with Quarkus extension (Update)
wednesday, april 20, 2022In a past video, I’ve been showing how to use Neo4j OGM in a Quarkus application. While the procedure and dependencies are still basically the same, there is now a new, handy Quarkus extension that you should check out. I’ve created a video that shows how to use it and the difference to the previous approach:
With the dependency, you can simply @Inject
OGM’s SessionFactory
in your code, which will be created and configured for you.
If you need additional configuration, you can adapt the Neo4j-specific properties.
This extension also makes the automated scanning of your entity classes more deterministic and reliable.
More information
- Example project on GitHub
- Neo4j OGM Quarkus extension (by Michael Simons)
- My interview with Michael
- Building recommendations with Neo4j & Quarkus
Update 2022-05-07
The Maven coordinates of the extension have moved to the org.neo4j
group ID.
You can update the dependency to the following:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-quarkus</artifactId>
<version>1.2.0</version>
</dependency>
Found the post useful? Subscribe to my newsletter for more free content, tips and tricks on IT & Java: