티스토리 뷰

Development/.etc

JPA 쿼리 로그 설정

쥬리리리 2023. 5. 9. 10:25

application.yml

spring:
  jpa:
    properties:
      hibernate:
        show_sql: true
        format_sql: true

 

application.properties

spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.format_sql=true
logging.level.org.hibernate.type.descriptor.sql=trace

 

show_sql : 모든 쿼리 노출

format_sql : 쿼리 포맷에 맞춰 노출

댓글
링크
최근에 올라온 글
Total
Today
Yesterday