Closed Xu-Gavin closed 8 months ago
I'm going to combine UserInfo.java
and User.java
into a single class because of the way I think that theUser
table should be stored in the database.
FYI: @itsmarsss
Docker Setup: Once you have started a docker container with the Cassandra database running, you need to add a keyspace manually (for now I hope):
docker run -p 9042:9042 --rm --name cassandra -d cassandra:4.0.7
docker exec -it cassandra bash -c "cqlsh -u cassandra -p cassandra"
CREATE KEYSPACE spring_cassandra WITH replication = {'class' : 'SimpleStrategy', 'replication_factor' : 1};
Test containers is going to be put in the backlog due to issues trying to get it to work.
There is a failing test. Let me try to resolve it first before review.
Failing tests resolved. PR #16 open for review.
build.gradle
file. This starter includes auto-configuration support for Cassandra and the Cassandra Java driver, as well as Spring Data Cassandra which provides abstractions for storing and querying your data.application.properties
file, specify properties like the keyspace name, contact points (IP addresses of the Cassandra nodes), and port. Specify other properties like the consistency level, load balancing policy, etc.@Table
and the fields with@Column
or@PrimaryKey
.@Autowire
your repositories into your services to use in business logic, and then your services can be used in controllers to handle HTTP requests.