public interface CarRepository extends CrudRepository<Car, Long> {
Optional<Car> findByCarId(String carId);
Iterable<Car> findAllByDealerName(String dealerName);
}
I have the following repository and my program works just fine.
In a lot of tutorials I see however that even when you extend CrudRepository, you should use the @Repository annotation.
Do I need it or not?