Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.54 KB

File metadata and controls

53 lines (34 loc) · 1.54 KB

Installation

  • Clone the repository
[email protected]:datastaxdevs/spring-boot-astra-spring-data-cassandra.git

Setup

  • Open application.properties and change those 2 properties:
# Replace with your token starting with AstraCS:...
spring.cassandra.password=<change_me>
# Replace with the path of your secure bundle
datastax.astra.secure-connect-bundle=<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/todos
  • Create a todo
curl -X POST http://localhost:8080/todos \
     -H "Content-Type: application/json" \
     -d '{"title": "New Todo", "description": "Todo details", "completed": false}'
  • You can go to the CQL Console in astra UI to see your data: Screenshot 2025-02-17 at 12 05 08