package com.royalrangers.security.repository;

import com.royalrangers.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;


@Repository
public interface UserRepository extends JpaRepository<User, Long> {
   
    User findByUsername(String username);
    User findByEmail(String email);
  
}

@@ -352,13 +352,117 @@
 email);%0A
+   %0A    User findByUsernameOrEmail(String username, String email);%0A%0A    int countByEmail(String email);%0A
   %0A%7D%0A

Update UserRepository.java