mybatis中log4j在控制台只打印sql语句

mybatis与Springmvc整合配置:

 
         
         
       
       
   
 

mybatisConfig配置:


    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"  
    "http://mybatis.org/dtd/mybatis-3-config.dtd">

   
       
       
   

   
          
       
           
           
           
           
           
           
           
       

   
 

log4j文件:

log4j.rootLogger=debug, stdout, FILE

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%m%n
log4j.logger.net.rubyeye.xmemcached=error
log4j.logger.com.opensymphony.xwork2=error
log4j.logger.org.springframework=error
log4j.logger.com.google.code=error
log4j.logger.com.itv.ti.manager=error
log4j.logger.org.mybatis.spring=error
log4j.logger.org.apache.struts2=error
log4j.logger.com.jolbox.bonecp=error
log4j.logger.org.apache.ibatis.logging.slf4j.Slf4jImpl=error
log4j.logger.com.jolbox.bonecp.ConnectionHandle=error
log4j.logger.org.slf4j.impl.Log4jLoggerAdapter=error

log4j.logger.org.apache.log4j.Logger=error




你可能感兴趣的:(mybatis中log4j在控制台只打印sql语句)