application.yml
Spring:
jpa:
properties:
hibernate:
show_sql: true
format_sql: true
use_sql_comments: true
logging.level:
org.hibernate.SQL: debug
org.hibernate.type: trace
show_sql: true
System.out 에 하이버네이트 실행 SQL 출력org.hibernate.SQL: debug
logger를 통해 하이버네이트 실행 SQL 출력format_sql: true
쿼리가 세로로 나옴org.hibernate.type: trace
파라미터 나옴 (운영시 꼭 성능 테스트)build.gradle
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.7'
폴더명 src/resources/META-INF/spring/
파일명 org.springframework.boot.autoconfigure.AutoConfiguration.imports
com.github.gavlyukovskiy.boot.jdbc.decorator.DataSourceDecoratorAutoConfigurati
on
src/resources/spy.properties
appender=com.p6spy.engine.spy.appender.Slf4JLogger