See the binding parameters in JPA query – java logs

spring framework show sql parameters

see binding parameters in jpa query

What would the world look like if log was not created for us – I ask, and you say nothing! You right, there is also another world :)

Getting back from the crazy thoughts, there is a config spring allows us to see the SQL statements that the JPA is doing behind the scenes..

In you application.yml file

...
spring.jpa.show-sql=true
...

Will show the sql statements on your logs. But it will show with ? for the values used.

To see those values also along with the query add the following on the application file.


logging.level.org.hibernate.SQL=debug
logging.level.org.hibernate.type.descriptor.sql=trace

That is it!

The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

String Ordered Permutation Algorithm Problem

setting JAVA_HOME on mac osx

hello world weblogic – hello world tutorial on weblogic

Passing composite object parameter to jersey in Restful Java web

J2EE Maven Eclipse Hello World Tutorial Part Two

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*