https://github.com/picadoh/boots
Example integration of Spring Boot and Cassandra through Docker
https://github.com/picadoh/boots
api cassandra java rest spring spring-boot
Last synced: about 1 year ago
JSON representation
Example integration of Spring Boot and Cassandra through Docker
- Host: GitHub
- URL: https://github.com/picadoh/boots
- Owner: picadoh
- Created: 2016-08-20T16:57:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T21:22:14.000Z (almost 2 years ago)
- Last Synced: 2025-03-31T04:41:13.258Z (about 1 year ago)
- Topics: api, cassandra, java, rest, spring, spring-boot
- Language: Java
- Size: 27.3 KB
- Stars: 3
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Introduction
This project is a simple Spring Boot application that accesses a Cassandra cluster.
**Requirements:**
- Docker
- Java 21
### Start Cassandra
```shell
docker-compose up -d
```
### Start the application
```shell
./mvnw spring-boot:run
```
Access http://localhost:8080 to see the data just inserted into the database.
### Local data setup
The table is pre-populated locally once the application starts. To manipulate the data, it can
be done via `cqlsh` as follows:
```shell
docker exec -it boots-cassandra-1 bash
root# cqlsh
cqlsh$ INSERT INTO localks.people (id, name) values ('FOO123', 'Jane');
cqlsh$ INSERT INTO localks.people (id, name) values ('BAR567', 'Joe');
```