728x90
위치 - application.propertires (Gradle)
# 콘솔에 SQL 보여줌
spring.jpa.show-sql=true
// 콘솔창 내용
Hibernate: insert into board (id, created_at, modified_at, content, password, title, writer) values (default, ?, ?, ?, ?, ?, ?)
spring.jpa.properties.hibernate.format_sql=true
// 콘솔창
Hibernate:
insert
into
board
(id, created_at, modified_at, content, password, title, writer)
values
(default, ?, ?, ?, ?, ?, ?)
logging.level.org.hibernate.type.descriptor.sql=trace

728x90
'스프링' 카테고리의 다른 글
| 22.12.26 회고 (0) | 2022.12.26 |
|---|---|
| 영속성 컨텍스트(Persistence Context) (0) | 2022.12.23 |
| API에 원하는 컬럼만 추려서 반환하는 방법 (0) | 2022.12.21 |
| Bean 등록하기 (0) | 2022.12.19 |
| 컴포넌트 스캔 & DI(Dependency Injection) (0) | 2022.12.19 |
댓글