본문 바로가기

CS 잡지식

use_sql_comments: true

spring:

 output:
  ansi:
   enabled: always

 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  // 아래 두개는 Console창에 출력(똑같은 쿼리문이 2번 날라가니, 둘 중 하나은 끈다)
    format_sql: true
    use_sql_comments: true # Querydsl은 결국 JPQL로 변환됨. 변환됨 JPQL을 Console에 보여준다.

logging.level:
 org.hibernate.SQL: debug # logger로 출력되므로, log 파일에 SQL 기록이 남는다.
# org.hibernate.type: trace