- SignUp / SignIn in Datastax Astra to get your DB for free
- Create
datastax_astra_db_spring_boot_app_database
database withdatastax_astra_db_spring_boot_app_keyspace
keyspace - Click connect on your database
- Chose
Java
inConnect using a driver
section - Click
Download Bundle
button and save zip archive assrc/main/resources/secure-connect-datastax-astra-db-spring-boot-app-database.zip
- Create token for
Administrator User
, grab yourClientID
andClisentSecret
- Add
src/main/resources/application-datastax.properties
file with content:datastax.astra.secure-connect-bundle=/path/to/project/src/main/resources/secure-connect-datastax-astra-db-spring-boot-app-database.zip datastax.astra.client-id=$yourClientID datastax.astra.client-secret=$yourClientSecret datastax.astra.keyspace=datastax_astra_db_spring_boot_app_keyspace
- Add dependency to your
pom.xml
file:<dependency> <groupId>com.datastax.oss</groupId> <artifactId>java-driver-core</artifactId> <version>4.13.0</version> </dependency>
- Run app:
mvn compile spring-boot:run
- Post few messages and load them via rest api
http :8080/api/v1/messages content=Hello,\ World\! http :8080/api/v1/messages content=Hello,\ again... http :8080/api/v1/messages
- Done
- youtube.com/watch?v=nBoHQOcwPS4
- https://github.com/DataStax-Examples/spring-petclinic-reactive
- https://github.com/DataStax-Examples/getting-started-with-astra-java
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Coroutines section of the Spring Framework Documentation
- Thymeleaf
- Spring Data Reactive for Apache Cassandra
- Handling Form Submission