把这个加入到logback.xml 中就可以打印mysql的日志了
<logger name="jdbc.sqltiming" level="debug"/> <logger name="com.ibatis" level="debug" /> <logger name="com.ibatis.common.jdbc.SimpleDataSource" level="debug" /> <logger name="com.ibatis.common.jdbc.ScriptRunner" level="debug" /> <logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="debug" /> <logger name="java.sql.Connection" level="debug" /> <logger name="java.sql.Statement" level="debug" /> <logger name="java.sql.PreparedStatement" level="debug" /> <logger name="java.sql.ResultSet" level="debug" /> <logger name="你的Mapper包路" level="debug" />