Hey everyone, I'm trying to setup that spring-data repository that uses @Query but I'm failing
//@Repository
public interface UserRepository extends CrudRepository<User, Long> {
@Query("SELECT u FROM User WHERE u.login = :login")
User findByLogin(@Param("login") String login);
}
I have the following repository, as simple as this:
public interface UserRepository extends CrudRepository<User, Long> {
@Query("SELECT u FROM User WHERE u.login = :login")
User findByLogin(@Param("login") String login);
}
Here, it's supposed to inherit all the common crud operations...
1 | noun | the hard durable wood of any oak; used especially for furniture and flooring 2 | noun | a deciduous tree of the genus Quercus; has acorns and lobed leaves
1 | noun | an island in Indonesia to the south of Borneo; one of the world's most densely populated regions 2 | noun | a platform-independent object-oriented programming language