Projection

팡태(❁´◡`❁)·2022년 4월 13일
0

SPRING_20220328

목록 보기
19/24
  • projection을 쓰면 VIEW 안써도 됨

package com.example.entity;

import java.util.Date;

import org.springframework.beans.factory.annotation.Value;

// 필요한 항목만 가져오기(projection)
public interface BuyProjection {

    Long getBno();

    Long getBcnt();

    Date getBregdate();

    @Value("#{ target.item.iname }")
    String getItemIname();

    @Value("#{ target.item.iprice }")
    Long getItemIprice();

    @Value("#{ target.member.uname }")
    String getMemberUname();

    @Value("#{ target.member.uphone }")
    String getMemberUphone();
}

0개의 댓글