package com.example.repository; import com.example.model.User; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; @Repository public interface UserRepository extends JpaRepository { Optional findByUsernameAndPassword(String username, String password); Optional findByUsername(String username); }