TestRepository extends JpaRepository<Test, Long>
JpaRepository
is an interface. Why do we extend it and not implement it as we know in Java? As far as I know, interfaces are implemented, not extended.
Can somebody explain to me please?
I assume your code looks like
interface TestRepository extends JpaRepository<Test, Long>
So TestRepository is an interface and interfaces can extend other interfaces not implement interfaces.
The TestRepository will be implemented from Spring Data JPA during runtime based on the SimpleJpaRepository