본문 바로가기
백엔드/Spring(Boot)

JPA 쿼리 및 로그 확인

by 김어찐 2021. 8. 21.
728x90

 

.yml 파일 또는 .properties 파일에 로깅 추가

 

테스트 확인

 

쿼리 파라미터 로그 남기기(p6spy)

외부 라이브러러리 사용

https://github.com/gavlyukovskiy/spring-boot-data-source-decorator

 

GitHub - gavlyukovskiy/spring-boot-data-source-decorator: Spring Boot integration with p6spy, datasource-proxy, flexy-pool and s

Spring Boot integration with p6spy, datasource-proxy, flexy-pool and spring-cloud-sleuth - GitHub - gavlyukovskiy/spring-boot-data-source-decorator: Spring Boot integration with p6spy, datasource-p...

github.com

의존 추가(gradle)

 

728x90

'백엔드 > Spring(Boot)' 카테고리의 다른 글

JPA 엔티티 설계시 주의점  (0) 2021.08.22
JPA 테이블 컬럼명 생성 전략  (0) 2021.08.22
spring devtools 설치  (0) 2021.08.21
Gradle sync 에러  (0) 2021.08.20
gradle cache 삭제  (0) 2021.08.20