Spring Boot — Show Hibernate SQL query | Code Factory

#show sql statement
logging.level.org.hibernate.SQL=debug
#show sql values
logging.level.org.hibernate.type.descriptor.sql=trace

1. org.hibernate.SQL=debug

#show sql statement
logging.level.org.hibernate.SQL=debug
2019-11-07 20:08:57.976 DEBUG 7248 --- [nio-8080-exec-1] org.hibernate.SQL                        : CALL FIND_EMP_BY_ID(?)

2. org.hibernate.type.descriptor.sql=trace

#show sql statement
logging.level.org.hibernate.SQL=debug
#show sql values
logging.level.org.hibernate.type.descriptor.sql=trace
2019-11-07 20:12:40.935 DEBUG 12248 --- [nio-8080-exec-1] org.hibernate.SQL                        : CALL FIND_EMP_BY_ID(?)
2019-11-07 20:12:40.947 TRACE 12248 --- [nio-8080-exec-1] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [INTEGER] - [1]
2019-11-07 20:12:40.958 TRACE 12248 --- [nio-8080-exec-1] o.h.type.descriptor.sql.BasicExtractor : extracted value ([id] : [INTEGER]) - [1]
2019-11-07 20:12:40.969 TRACE 12248 --- [nio-8080-exec-1] o.h.type.descriptor.sql.BasicExtractor : extracted value ([name] : [VARCHAR]) - [emp1]
2019-11-07 20:12:40.971 TRACE 12248 --- [nio-8080-exec-1] o.h.type.descriptor.sql.BasicExtractor : extracted value ([salary] : [BIGINT]) - [1000]

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Coding and its Helping Hand

An integrated development environment (IDE) where coders work in.

3 Tips To Become a Valuable Asset in Your Team

People sitting at a long table

Azure DevOps Delivery Plans

List of Debugging Tools for C-Sharp .Net Development | iFour Technolab

List of Debugging Tools for C-Sharp .Net Development | iFour Technolab

On-demand Resources

OnCollisionEnter Vs. OnTriggerEnter — When to use them?

How to study to become a Data Analyst?

10 Most Useful VS Code Extensions For Web Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Code Factory

Code Factory

More from Medium

Communication Between Microservices | Spring WebClient

Spring Boot Application With Multiple Data sources

Implementing Another In-Demand Spring Project — Spring Kafka

Spring Boot Microservices — Part4 — OpenFeign