[R9] User jpa repository with custom method to find user by login
This commit is contained in:
parent
fd034005b8
commit
bfde3e76d9
@ -0,0 +1,22 @@
|
||||
package com.mirna.hospitalmanagementapi.domain.repositories.auth;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import com.mirna.hospitalmanagementapi.domain.entities.auth.User;
|
||||
|
||||
/**
|
||||
* Repository interface for retrieving and manipulating all User objects using their unique Long identifier.
|
||||
*
|
||||
* @author Mirna Gama
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface UserRepository extends JpaRepository<User, Long>{
|
||||
|
||||
/**
|
||||
*
|
||||
* @param login A string representing the user's system login
|
||||
* @return The corresponding user information if successful, or null if it is non-existent
|
||||
*/
|
||||
UserDetails findUserByLogin(String login);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user