Warning
move to https://github.com/wicksome/TIL/blob/main/tools/mybatis-log-to-sql (link)
Replace all
?
characters to parameters.
https://wickso.me/mybatis-log-to-sql/
AS-IS
2017-10-08 17:39:34 [DEBUG](BaseJdbcLogger.java:159) ==> Preparing: SELECT * FROM table WHERE id = ?
2017-10-08 17:39:34 [DEBUG](BaseJdbcLogger.java:159) ==> Parameters: 2001(Integer)
TO-BE
SELECT * FROM table WHERE id = 2001
$ git clone https://github.com/wicksome/mybatis-log-to-sql.git
$ cd mybatis-log-to-sql && npm init
$ node index.js
>> SQL: 2017-10-08 17:39:34 [DEBUG](BaseJdbcLogger.java:159) ==> Preparing: SELECT * FROM table WHERE id = ?
>> Parameters: 2017-10-08 17:39:34 [DEBUG](BaseJdbcLogger.java:159) ==> Parameters: 2001(Integer)
--------------------------------------------------------------------------------
SELECT * FROM table WHERE id = 2001
β Copy sql!