Skip to content

datastaxdevs/spring-boot-astra-data-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  • Clone the repository
git@github.com:datastaxdevs/spring-boot-astra-spring-data-cassandra.git

Setup

  • Open application.propoerties and change datastax.astra.token with your token and datastax.astra.endpoint with the endpoint of your database
datastax.astra.token=<change_me>
datastax.astra.endpoint=<change_me>

use the application

  • Start the application (first start could take up a few seconds as the table is created for you)
mvn spring-boot:run
curl -X GET http://localhost:8080/collections/todos
curl -X GET http://localhost:8080/tables/todos
  • Create a todo
curl -X POST http://localhost:8080/collections/todos \
     -H "Content-Type: application/json" \
     -d '{"title": "New Todo", "description": "Todo details", "completed": false}'
     
curl -X POST http://localhost:8080/tables/todos \
     -H "Content-Type: application/json" \
     -d '{"title": "New Todo", "description": "Todo details", "completed": false}'
  • You can go data explorer: Screenshot 2025-02-17 at 15 06 28

About

TodoList with Spring Boot and AstraDB using Data API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages