Reputation: 986
I am a noob in Spring framework. I know there is the findAll method to query all the data in a database. Is there a way to count the number of rows in a database using the Spring framework and doesn't require to write a SQL query?
Upvotes: 9
Views: 14605
Reputation: 1413
There is a method count()
in CrudRepository
. You can check official documentation.
Upvotes: 15