jdbc获取PreparedStatement最终执行的sql语句

//直接打印PreparedStatement对象
System.out.println(ps);
输出结果:
com.mysql.jdbc.JDBC42PreparedStatement@5f205aa: select * from student where name like '%moyifeng%' order by id limit 0,20 
原文地址:https://www.cnblogs.com/zhangguangxiang/p/14232484.html