首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

ibatis 没法 打印SQL到控制台,commons-logging-api.jar

2012-12-21 
ibatis 无法 打印SQL到控制台,commons-logging-api.jarlog4j.appender.stdoutorg.apache.log4j.ConsoleAp

ibatis 无法 打印SQL到控制台,commons-logging-api.jar

log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%nlog4j.logger.com.ibatis=debuglog4j.logger.com.ibatis.common.jdbc.SimpleDataSource=debuglog4j.logger.com.ibatis.common.jdbc.ScriptRunner=debuglog4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=debuglog4j.logger.java.sql.Connection=debuglog4j.logger.java.sql.Statement=debuglog4j.logger.java.sql.PreparedStatement=debug,stdout

?在log4j配置文件插入以上代码任然不行,网络上各种方法都没有,后面慢慢测试才发现,应该使用commons-logging.jar

而我使用的是commons-logging-api.jar

换成commons-logging.jar 就正确了!

至于两个包的区别,我在官方上没找到答案。

热点排行