如何为Mybatis配置log4j以打印我的SQL
我的项目是用SpringMVC + Mybatis + EXTJS4设置的。这是我的配置:
# Rules reminder:
# DEBUG < INFO < WARN < ERROR < FATAL
# Global logging configuration
log4j.rootLogger=DEBUG,stdout
log4j.logger.org.apache.ibatis=DEBUG,stdout
log4j.logger.java.sql=DEBUG,stdout
#log4j.additivity.com.ibatis = false
#log4j.additivity.java.sql = false
## Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d %C: %m%n
但是它不在控制台中打印SQL,任何人都可以帮助我吗?谢谢