til icon indicating copy to clipboard operation
til copied to clipboard

Hibernate 쿼리 로그

Open raycon opened this issue 4 years ago • 2 comments

# logs the SQL statements
logging.level.org.hibernate.SQL=DEBUG
# Logs the JDBC parameters passed to a query
logging.level.org.hibernate.type=TRACE

raycon avatar Oct 21 '20 08:10 raycon

JdbcTemplate 로그

logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG
logging.level.org.springframework.jdbc.core.StatementCreatorUtils=TRACE

raycon avatar Oct 21 '20 08:10 raycon

쿼리를 보기 좋게 출력하려면

spring.jpa.properties.hibernate.format_sql=true

raycon avatar Oct 21 '20 08:10 raycon