package com.chantha.jdbc.jpa.repo; import com.chantha.jdbc.jpa.model.Customer; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; public interface CustomerRepo extends CrudRepository { @Query(value ="SELECT * FROM tb_customer c INNER JOIN tb_order o ON (c.id=o.cus_id)",nativeQuery = true) @Override Iterable findAll(); }