스프링부트 DB 설정
yml 파일로 해보자.
spring:
datasource:
url: jdbc:h2:tcp://localhost/~/querydsl
username: sa
password:
driver-class-name: org.h2.Driver
jpa:
hibernate:
ddl-auto: create
properties:
hibernate:
# show_sql: true
format_sql: true
logging.level:
org.hibernate.SQL: debug
# org.hibernate.type: trace
쿼리 로그의 파라미터 확인
org.hibernate.type: trace
부분 주석 해제
보이긴 하지만 불편 특히, 쿼리가 복잡해 질 때
p6spy 설치
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.8'