最简单的就是直接在jdbc db url加profileSQL=true,会在stderr输出sql执行情况,有毫秒日志。 Add 'logger' and 'profileSQL' to the jdbc url: &logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=true Then you will get the SQL statement below: The default logger is: com.mysql.jdbc.log.Sta…