sâmbătă, 23 iulie 2016

Hibernate logging with DataSource-proxy via Hibernate JPA + Spring 4 MVC (Spring Data)

Before reading this post is strongly recommended to read The best way of logging JDBC statements by Vlad Mihalcea.

This is a sample application that shows how to use the DataSource-proxy to log the SQL statements with the bind parameter values. In three simple images, the application will do this:

1. Run it:

2. Press the button and check the database (is a MySQL database):

3. Check the server log and the /output.log file:

Done! The complete application is here.

Niciun comentariu:

Trimiteți un comentariu