docker pull cassandra:latest
docker run -d -p9042:9042 --name cass_cluster cassandra:latest
docker exec -it cass_cluster cqlsh
create keyspace bezkoder with replication={'class':'SimpleStrategy', 'replication_factor':1};
use bezkoder;
CREATE TABLE monopoly(
id uuid PRIMARY KEY,
pot int,
gameover boolean
);
CREATE TABLE entrepreneur(
id uuid PRIMARY KEY,
name text,
tokentype text,
funds int,
monopolyid uuid,
squareid int,
human boolean,
message text
);
CREATE INDEX monopoly_idx ON entrepreneur ( monopolyid );
CREATE TABLE property(
monopolyid uuid,
squareid int,
entrepreneurid uuid,
ownedType text,
PRIMARY KEY((monopolyid), squareid)
);
CREATE INDEX entrepreneur_idx ON property ( entrepreneurid );
DROP TABLE <TableName>;
DESC[RIBE] keyspaces;
TRUNCATE <TableName>;
For further reference, please consider the following sections:
- Official Gradle documentation
- Spring Boot Gradle Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Data JPA
- Spring Data for Apache Cassandra
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
- Accessing Data with JPA
- Spring Data for Apache Cassandra
These additional references should also help you: