Complete the code to declare a repository interface that extends JpaRepository.
public interface UserRepository extends [1]<User, Long> {}The JpaRepository interface provides JPA related methods for standard data access operations.
Complete the code to add a method that finds users by their email in the repository interface.
List<User> findBy[1](String email);Spring Data JPA derives queries from method names. 'findByEmail' searches by the email field.
Fix the error in the repository method declaration to correctly find users by status.
List<User> findByStatus[1](String status);'findByStatusIs' is a valid Spring Data JPA method name to find by status field equality.
Complete the code to create a repository method that finds users with age greater than a value.
List<User> findByAge[1](int age);'findByAgeGreaterThan' finds users older than the given age. No extra parameter is needed here.
Fill all three blanks to define a repository method that finds users by last name and orders by first name ascending.
List<User> findBy[1]OrderBy[2][3](String lastName);
This method finds users by last name and orders the results by first name in ascending order.