08 Using Repository pattern with Spring Data - Build a book tracker app (Spring Boot + Cassandra)

preview_player
Показать описание
Click here to register for a free account on DataStax (Required for following along the series):

GitHub Link:

Minimal data dump files to use:

In this video:
------------------------------------------
In this video, we will use Spring Data to connect to Apache Cassandra using entity classes and the repository pattern.

Release schedule:
New video released every 3 days.

Welcome to this Code With Me Series where we build a Good Reads clone using Java, Spring Boot and Apache Cassandra. The goal of this series is to build a full web application that is scalable and highly available.

The series will walk you through the application, system and UI design and development.

Technologies:
Application Tier: Spring Boot
Database: Apache Cassandra
Data Layer: Spring Data Cassandra
Security: Spring Security
View Layer: Thymeleaf

The idea of the series is sponsored by DataStax. All content created and produced by Java Brains.

#CodeWithMe #SpringBoot #Cassandra
Рекомендации по теме
Комментарии
Автор

Solution for 2 issues :
Issue 1: "The dependencies of some of the beans in the application context form a cycle. "
Solution: Either you can use spring boot version 2.5.2 or 2.5.7
If you want to use 2.6.1 then add true in application.yml file

Issue 2:
Solution: Either you can directly delete the table manually in the database and recreate
or
update(application.yml) schema-action: recreate and run the application and then change it back to create-if-not-exists and re run -> this will delete your table automatically and recreate it.

Hope it will help you :)

ruhul
Автор

Nice Tutorial, Just to mention for confused people like me, Column name in Db autocreated is 'id' and not 'author_id'. Anyway this auto creation is not working, no matter what schema type I choose.

yagyeshist
Автор

I got the following message:

"The dependencies of some of the beans in the application context form a cycle. "

I tried to follow the instructions. Have you experienced the same?

cselenyak
Автор

Please someone help me to solve..I am not able to create tables in cassandra.i am getting an error Field AurhorRepository require a bean type..

pramodm
Автор

Can I get the repo for the data loader ??

joydeepchowdhury
Автор

Cannot make a static reference to the non-static method save(Author) from the type CrudRepository<Author, String>

srkz
Автор

"schema-action: create-if-not-exists" does not work for me. If I manually create a table in CQL then everything works fine. I tried different things but it did not work

algomonster
Автор

Thanks for this great tutorial! I'm so glad I found this video, it's been really helpful in understanding how to use the repository pattern with Spring Data and Cassandra. Appreciate your hard work!

samyosm
Автор

My table is not being created when I try to save my author and I get the following error: table main.author_by_id does not exist

Any solution for it?

Jeptxxle
Автор

hello My Cassandra is not creating entity tables, any idea? First it was not recognizing repository, but then after adding @EnableCassandraRepositories. Server starts but not creating entity.

NirdeshM
Автор

I followed your words line for line but after 8 different trials it still gave error message of "Failed to instantiate Factory method 'cassandraSession' threw exception with message:"

faturotibabawale
Автор

I got this circular dependency error:

"The dependencies of some of the beans in the application context form a cycle"

I understand this can be resolved by setting the prop or upgrading the boot version. I am wondering why did Kaushik not get this while he was developing the code? Is it VSCode handles differently this situation?


Having circular dependency is not good in code. How can we resolve the circular dependecies in such case?
-Praveen

praveenbits
Автор

Hello, thank you for your great videos. I am a member of your channel and I am having problems connecting to the Cassandra database. I did the same as you but I get a connection error.

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-01-17T00:04:30.410+01:00 ERROR 20304 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed

abdimohamed