cfex / spring-data-starter

⚡️ A sample Spring Data Cassandra REST API

Home Page:https://astra.datastax.com/register

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Data Cassandra REST API

10 minutes, Beginner, Start Building

This application uses Spring Data Cassandra and DataStax Astra to build a REST API for a backend service that interacts with products and orders.

image

Objectives

  • Run a REST API that connects to DataStax Astra

How this works

We're using Spring Data Cassandra and Datastax Astra to build a REST API that stores Products and Orders.

Get Started

To build and play with this app, follow the build instructions that are located here: https://github.com/DataStax-Examples/spring-data-starter

Running Spring Data Cassandra REST API

Follow the instructions below to get started.

Prerequisites

Let's do some initial setup.

DataStax Astra

  1. Create a DataStax Astra account if you don't already have one: image

  2. On the home page. Locate the button Add Database image

  3. Pick free plan and a region close to you, click configure. image image

  4. Define a database name, keyspace name and credentials (Take note of the DB Password) image

  5. Your Astra DB will be ready when the status will change from Pending to Active 💥💥💥 image

  6. Locate the combo Organization: <Your email> on the top navigation. In the drop down menu, click your current organization. image

  7. Scroll down to the bottom of the page and locate Service Account in Security Settings and select Copy Credentials as shown below. image

Github

  1. Click Use this template at the top of the GitHub Repository: image

  2. Enter a repository name and click 'Create repository from template': image

  3. Clone the repository: image

🚀 Getting Started Paths:

Make sure you've completed the prerequisites before starting this step

Running on Gitpod

  1. Click the 'Open in Gitpod' link: Open in IDE

  2. Once your Gitpod workspace has loaded, you'll be asked to paste your service account credentials in the Gitpod terminal at the bottom of the screen: image

  3. When the app is finished building, click the 'Open Browser' button on the bottom right of the screen: image

  4. You've successfully build a Spring Data Cassandra application! image

About

⚡️ A sample Spring Data Cassandra REST API

https://astra.datastax.com/register

License:Apache License 2.0


Languages

Language:Java 73.4%Language:Shell 24.7%Language:Dockerfile 1.9%