30 minutes, Beginner, Start Building
Create a Spring application that reads data from DataStax Astra using a REST API.
- Demonstrate how to communicate with the AstraDB REST API using Spring.
Once the Astra credentials are provided, the necessary tables are created in the database. Then, you can run the app and view the output from the AstraDB REST API.
To build and play with this app, follow the build instructions that are located here: https://github.com/DataStax-Examples/astradb-spring-rest
Follow the instructions below to get started.
Let's do some initial setup.
-
Create a DataStax Astra account if you don't already have one:

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

-
Your Astra DB will be ready when the status will change from
PendingtoActive💥💥💥
-
After your database is provisioned, head to the
Connectscreen and copy your connection information (we'll need this later!):
-
Click
Use this templateat the top of the GitHub Repository:
-
Enter a repository name and click 'Create repository from template':

Make sure you've completed the prerequisites before starting this step
-
Set your Astra database details by running the gitpod setup script in the Gitpod terminal at the bottom of the screen:
./gitpod-setup.sh- Run the app and view the output in the terminal:
./gradlew bootRun 





