hrming

[Spring Boot] JPA log 설정 본문

Spring Boot

[Spring Boot] JPA log 설정

hrming 2024. 3. 18. 01:38

application.properties파일에 다음 속성을 추가하면, 아래 캡쳐처럼 콘솔창에서 쿼리를 확인할 수 있다. 

 

logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE

 

 

 

application.properties파일에 다음 속성을 추가하면, 아래 캡쳐처럼 콘솔창에 쿼리가 정렬되어 표시됨. 

spring.jpa.properties.hibernate.format_sql=true

 


참고 및 출처: 

https://www.baeldung.com/sql-logging-spring-boot

 

'Spring Boot' 카테고리의 다른 글

[Java] Builder pattern  (0) 2024.07.18
Comments