로딩
요청 처리 중입니다...

[spring] repository 에서 Entity가 아닌 pojo 매핑 (interface , dao 사용)

 [spring] repository 에서 Entity가 아닌 pojo 매핑 (interface , dao 사용)

interface native query가 아닐때도 interface로 매핑이 가능하다. @Repository public interface TestRepository extends JpaRepository { // @Query("SELECT " + "a.column1 as column1, " + "a.column2 as column2, " + "a.column3 as column3" + "FROM TestEntity AS a " + "WHERE a.column1= :value ") List testWithInterface(@Param(value = "value") int value); } public interface TestInterface{ int getColumn1(); String getColumn2(); String getC...

# dao # entity # getInterface # interface # mappring # pojo # repository # toIntExact