Spring 原生SQL查询
public interface UserRepository extends JpaRepository<User, Long> {
//按表查询
@Query(value = "SELECT * FROM USERS WHERE EMAIL_ADDRESS = ?1", nativeQuery = true)
User findByEmailAddress(String emailAddress);
}
public interface UserRepository extends JpaRepository<User, Long> {
//按表查询
@Query(value = "SELECT * FROM USERS WHERE EMAIL_ADDRESS = ?1", nativeQuery = true)
User findByEmailAddress(String emailAddress);
}