🎯 SpringBoot-Cassandra ?
docker-compose up --build -d
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-cassandra</artifactId>
</dependency>
📌 Cassandra Create Keyspace ?
# cqlsh
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.0.0 | Cassandra 4.0.7 | CQL spec 3.4.5 | Native protocol v5]
Use HELP for help.
cqlsh> CREATE KEYSPACE studentkeyspace WITH replication = {'class':'SimpleStrategy','replication_factor':1};
cqlsh> describe keyspaces;
studentkeyspace system_auth system_schema system_views
system system_distributed system_traces system_virtual_schema
📌 Cassandra Create Table ?
cqlsh> use studentkeyspace;
cqlsh:studentkeyspace> CREATE TABLE student(studentnumber int PRIMARY KEY,firstname text,lastname text,email text);