강의

멘토링

커뮤니티

Inflearn Community Q&A

jinwoo292328's profile image
jinwoo292328

asked

Real-world! Spring Boot and JPA Utilization 2 - API Development and Performance Optimization

Simple Order Lookup V3: Converting Entities to DTOs - Fetch Join Optimization

쿼리 로그가 안나오는 경우는 세팅이 문제인가요?

Written on

·

1.8K

0

강의보면 

.......................... org.hibernate.SQL

select

   order0_.order_id.......

 

이렇게 친절하게 개행된 쿼리가 나오는데 저는 안나오네요

아래는 설정화면 입니다.

생각해보니 강의 3개째보는데 개행된 쿼리는 나온적이 없어요. 혹시 인텔리제이 커뮤니티 버전이라서 그런걸까요?

 

 

 

JPAjavaspring-bootspring

Answer 1

0

안녕하세요. 진우님, 공식 서포터즈 OMG입니다.

제공해드리는 프로젝트 코드의 yml 파일을 복사하여 확인해주세요 :)

spring:
datasource:
url: jdbc:h2:tcp://localhost/~/jpashop
username: sa
password:
driver-class-name: org.h2.Driver

jpa:
hibernate:
ddl-auto: create
properties:
hibernate:
show_sql: true
format_sql: true
default_batch_fetch_size: 1000 #최적화 옵션

logging.level:
org.hibernate.SQL: debug
# org.hibernate.type: trace

datasource만 기존걸로 변경하고 확인해주세요.

커뮤니티 버전에서도 로그 출력됩니다.

 


감사합니다.

jinwoo292328's profile image
jinwoo292328

asked

Ask a question