java - How to intercept the Hibernate generated SQL? -
For a security arrangement that works as an older brother (such as the mandatory access control), we Select All Hibernate We enable user, timestamp and SQL in a database to enable some profiling with other devices. Information is allowed to determine what the user has tried to see, the ready-made properties for selected statements are valuable. We require full SQL statement including all parameters.
Is there a listener or interceptor where we can join and handle all these things? The biggest outstanding problem is still collecting the statement of the statements.
Thanks
The actual parameter values can be made available (at least For my knowledge), when using the logging level of JDBCAppender, if you want the logger output itself in the database.
Alternatively, you take a look at the one who claims to:
In the logout output for the statement made, the compulsive reasoning is automatically SQL The output is inserted in. It improves readability and debugging significantly for many cases.
If this is not suitable, you can check whether the weblogic server receives the equivalent functionality, which comes out of the box with weblogic jdbc drivers for some databases . Both of these write on System.out and not for a database (unless I am making a mistake), so it can not be useful.
Comments
Post a Comment