Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 김영한
- java
- QueryDSL
- 알고리즘
- Exception
- JDBC
- 인프런
- jpa
- 그리디
- 스프링
- 자바
- http
- AOP
- SpringBoot
- 백준
- kotlin
- JPQL
- spring
- 스프링 핵심 원리
- Greedy
- Servlet
- db
- Android
- transaction
- Thymeleaf
- Proxy
- springdatajpa
- 스프링 핵심 기능
- pointcut
- Spring Boot
Archives
- Today
- Total
목록조회 성능 최적화 (1)
개발자되기 프로젝트
지연 로딩과 조회 성능 최적화(JPA에서 DTO 바로 조회)
1. Controller @GetMapping("/api/v4/simple-orders") public List ordersV4(){ return orderRepository.findOrderDtos(); } 2. Repository JPA에서 DTO를 바로 조히하는 방법 new 명령어를 사용해서 JPQL결과를 DTO로 즉시 변환. Query안에 DTO를 생성하여 값을 직접 넣어줌. public List findOrderDtos() { return em.createQuery( "select new springjpa2.repository.OrderSimpleQueryDto(o.id, m.name, o.orderDate, o.status, d.address) " + "from Order o " + "join..
인프런/[인프런] Springboot와 JPA활용 2
2021. 8. 23. 00:20