개발블로그

  • 홈
  • 태그
  • 방명록

new 1

[JAVA] @Query에서 DTO로 조회하기

repository에서 dto로 조회하려면 new operation을 사용해야한다. 1. 일단 내가 필요한 데이터 들을 뽑아 Dto로 생성 package study.datajpa.dto; import lombok.Data; @Data // getter, setter 다 쓰임 웬만하면 사용 X public class MemberDto { private Long id; private String username; private String teamName; public MemberDto(Long id, String username, String teamName) { this.id = id; this.username = username; this.teamName = teamName; } } 2. @Query와..

JAVA 2022.02.15
이전
1
다음
더보기
프로필사진

개발블로그

개발자 박응디 cjdrud123@naver.com

  • 분류 전체보기 (126)
    • JAVA (81)
    • Python & Django (6)
    • Server(설정 등) (5)
    • DB (2)
    • Git (4)
    • Swift (7)
    • React (6)
    • AWS (2)
    • CT (5)
    • 참고사항 (8)

Tag

mapping, 개발, IP, IOS, 개발자, code, query, JPA, 설정, DB, entity, TDD, python, java, swift, React, test, Spring, APP, testcode,

Calendar

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

Copyright © Kakao Corp. All rights reserved.

티스토리툴바