public interface UserRepository extends JpaRepository { @Query(value = \"SELECT * FROM USERS WHERE EMAIL_ADDRESS = ?0\", nativeQuery = true) User
You can do something like this
@Query(value = "SELECT YOUR Column1, ColumnN FROM USERS WHERE EMAIL_ADDRESS = ?0", nativeQuery = true) List findByEmailAddress(String emailAddress);
You have to do the mapping. Take a look at the Spring Data Repository as well. Source