Skip to content

Java REST API project using Spring Boot 3, Neptune and TinkerGraph database

License

Notifications You must be signed in to change notification settings

erebelo/spring-neptune-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Neptune Demo

REST API project developed in Java using Spring Boot 3, Neptune and TinkerGraph database.

Requirements

  • Java 17
  • Spring Boot 3.x.x
  • Apache Maven 3.8.6

Libraries

  • spring-common-parent: Manages the Spring Boot version and provide common configurations for plugins and formatting.

Configuring Maven for GitHub Dependencies

To pull the spring-common-parent dependency, follow these steps:

  1. Generate a Personal Access Token:

    Go to your GitHub account -> Settings -> Developer settings -> Personal access tokens -> Tokens (classic) -> Generate new token (classic):

    • Fill out the Note field: Pull packages.
    • Set the scope:
      • read:packages (to download packages)
    • Click Generate token.
  2. Set Up Maven Authentication:

    In your local Maven settings.xml, define the GitHub repository authentication using the following structure:

    <servers>
      <server>
        <id>github-spring-common-parent</id>
        <username>USERNAME</username>
        <password>TOKEN</password>
      </server>
    </servers>

    NOTE: Replace USERNAME with your GitHub username and TOKEN with the personal access token you just generated.

Run App

  • Set the following environment variables if running the project for a spring profile other than local: AWS_REGION, AWS_NEPTUNE_ENDPOINT, AWS_NEPTUNE_PARTITION_KEY, and AWS_NEPTUNE_PARTITION_NAME.
  • Use the application property aws.neptune.embedded to switch between Neptune and TinkerGraph database.
  • Run the SpringNeptuneDemoApplication class as Java Application.

DB Preview

Collection

Project Collection

Diagram

Entity Relationship Diagram