Java Code Examples for org.apache.ibatis.logging.jdbc.ConnectionLogger#newInstance()
The following examples show how to use
org.apache.ibatis.logging.jdbc.ConnectionLogger#newInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseExecutor.java From mybaties with Apache License 2.0 | 5 votes |
protected Connection getConnection(Log statementLog) throws SQLException { Connection connection = transaction.getConnection(); if (statementLog.isDebugEnabled()) { //如果需要打印Connection的日志,返回一个ConnectionLogger(代理模式, AOP思想) return ConnectionLogger.newInstance(connection, statementLog, queryStack); } else { return connection; } }
Example 2
Source File: BaseExecutor.java From mybatis with Apache License 2.0 | 5 votes |
protected Connection getConnection(Log statementLog) throws SQLException { Connection connection = transaction.getConnection(); if (statementLog.isDebugEnabled()) { //如果需要打印Connection的日志,返回一个ConnectionLogger(代理模式, AOP思想) return ConnectionLogger.newInstance(connection, statementLog, queryStack); } else { return connection; } }