{"id":26221402,"url":"https://github.com/thoughtscript/java_spring_graph_2025","last_synced_at":"2026-04-11T19:04:36.940Z","repository":{"id":281916447,"uuid":"946250272","full_name":"Thoughtscript/java_spring_graph_2025","owner":"Thoughtscript","description":"Java Spring Boot Graph DB ","archived":false,"fork":false,"pushed_at":"2025-03-11T19:58:54.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T20:35:19.730Z","etag":null,"topics":["docker","docker-compose","java","neo4j","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Thoughtscript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-10T21:07:49.000Z","updated_at":"2025-03-11T19:58:58.000Z","dependencies_parsed_at":"2025-03-11T20:45:41.508Z","dependency_job_id":null,"html_url":"https://github.com/Thoughtscript/java_spring_graph_2025","commit_stats":null,"previous_names":["thoughtscript/java_spring_graph_2025"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Thoughtscript/java_spring_graph_2025","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thoughtscript%2Fjava_spring_graph_2025","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thoughtscript%2Fjava_spring_graph_2025/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thoughtscript%2Fjava_spring_graph_2025/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thoughtscript%2Fjava_spring_graph_2025/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thoughtscript","download_url":"https://codeload.github.com/Thoughtscript/java_spring_graph_2025/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thoughtscript%2Fjava_spring_graph_2025/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266802645,"owners_count":23986384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","java","neo4j","spring-boot"],"created_at":"2025-03-12T16:20:07.288Z","updated_at":"2025-12-30T22:06:52.671Z","avatar_url":"https://github.com/Thoughtscript.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java_spring_graph_2025\r\n\r\n[![](https://img.shields.io/badge/Spring%20Boot-3.4.3-green.svg)](https://spring.io/projects/spring-boot)\r\n[![](https://img.shields.io/badge/Neo4J-5-blue.svg)](https://neo4j.com)\r\n[![](https://img.shields.io/badge/Maven-3.8.6-white.svg)](https://maven.apache.org/download.cgi)\r\n[![](https://img.shields.io/badge/Docker-blue.svg)](https://www.docker.com/) \r\n\r\nHaving some fun with [Spring Boot 3.4.3](https://spring.io/projects/spring-boot), [Neo4J](https://neo4j.com/product/cypher-graph-query-language/), and **Graph Databases**.\r\n\r\n**AWS** [defines](https://aws.amazon.com/nosql/graph/) **Graph Databases** as follows:\r\n\r\n    \"A graph database is a systematic collection of data that emphasizes the relationships \r\n    between the different data entities. The NoSQL database uses mathematical graph theory \r\n    to show data connections.\"\r\n\r\nI've used **Graph-Theoretic** approaches in several ways:\r\n\r\n1. **NoSQL** - relational aggregation (in leiu of **JOIN** statements, **JOIN** tables, **Map-Reduce** operations, and/or multiple **DBRef**s) - mostly a mix of **Mongo DB**, **Dynamo DB**.\r\n2. **GraphQL**\r\n3. A bit of **AWS Neptune** and **Neo4J** (but without standing up the DB's or configuring them).\r\n\r\n**Neo4J Cypher** uses [ASCII Art Syntax](https://neo4j.com/docs/cypher-manual/5/introduction/cypher-overview/) for queries typified by the scheme: \r\n* `(nodes)-[:CONNECT_TO]→(otherNodes)`\r\n* `(MyNode)-[:VERB_OR_RELATION_TO]→(MyOtherNode)`\r\n\r\n## Use\r\n\r\n### Docker Compose\r\n\r\n```bash\r\ndocker-compose up\r\n\r\n# If using Docker Compose Engine V2:\r\ndocker compose up\r\n```\r\n\r\n### SSL\r\n\r\n```bash\r\nkeytool -genkey \\\r\n  -alias bootexample \\\r\n  -keystore bootexample.p12 \\\r\n  -storetype PKCS12 \\\r\n  -keyalg RSA \\\r\n  -storepass af3DF*34afefwefehu \\\r\n  -validity 730 \\\r\n  -keysize 4096\r\n```\r\n\r\n## Tests, Testing, and Queries\r\n\r\nExec into the `neo4j` instance:\r\n```bash\r\ncypher-shell -u neo4j -p examplepw\r\n\r\n$ \u003e Match (c:Course {name: \"Art\"}) - [r:HAS_STUDENT] -\u003e (s:Student) RETURN c, collect(r), collect(s);\r\n\r\n$ \u003e MATCH (c:Course {name: \"Art\"}) RETURN c;\r\n\r\n$ \u003e MATCH (s:Student {firstname: \"Class\", lastname: \"Dunce\"}) RETURN s;\r\n```\r\n\r\n\u003e Other **CQL** queries are available [here](./neo4j/init.cql).\r\n\r\n\u003e (Some) Acceptance and Live Integration Tests are available [here](./_acceptance/Java%20Spring%20Graph.postman_collection.json) through **Postman**. (Some example Unit Tests have also been [added](./bootgraph/src/test) and [configured](./bootgraph/pom.xml).)\r\n\r\n## Neo4J\r\n\r\n* Access to the built-in view [here](http://localhost:7474/db/data/) is now [deprecated](https://stackoverflow.com/questions/76221610/http-localhost7474-db-data-returns-a-404-after-login).\r\n* Using the recommended `docker-compose.yml` [setting](https://neo4j.com/docs/operations-manual/current/docker/docker-compose-standalone/): `NEO4J_AUTH=neo4j/examplepw` doesn't appear to stick. One can still log in afterwards with `neo4j/neo4j` (the default, and it will request an immediate password change). \r\n  * As such, I've opted to use `neo4j-admin set-initial-password examplepw` in the [Dockerfile](./neo4j/dockerfile) instead.\r\n\r\n## Resources and Links\r\n\r\n1. https://docs.spring.io/spring-data/neo4j/reference/getting-started.html\r\n2. https://neo4j.com/docs/cypher-manual/current/queries/concepts\r\n3. https://aws.amazon.com/nosql/graph\r\n4. https://www.liquidweb.com/blog/neo4j-graph-database-installing-neo4j-on-ubuntu-20-04/\r\n5. https://github.com/neo4j-examples/movies-java-spring-data-neo4j/tree/main\r\n6. https://www.baeldung.com/spring-data-neo4j-intro\r\n7. https://neo4j.com/docs/operations-manual/current/docker/docker-compose-standalone/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtscript%2Fjava_spring_graph_2025","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtscript%2Fjava_spring_graph_2025","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtscript%2Fjava_spring_graph_2025/lists"}