hrming
[Spring Boot] JPA log 설정 본문
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' 카테고리의 다른 글
[Spring Boot] Spring boot 에서 JSP 사용시 제약 사항 (0) | 2025.06.28 |
---|---|
[Java] Builder pattern (0) | 2024.07.18 |
Comments