zoukankan      html  css  js  c++  java
  • hibernate查询显示参数

    log4j.property改为如下

    ### direct log messages to stdout ###  
            log4j.appender.stdout=org.apache.log4j.ConsoleAppender  
            log4j.appender.stdout.Target=System.out  
            log4j.appender.stdout.layout=org.apache.log4j.PatternLayout  
            log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n  
              
            log4j.logger.org.hibernate=debug
            log4j.logger.org.hibernate.hql.ast.AST=debug
            
            #下面的两条配置非常重要,设置为trace后,将可以看到打印出sql中 ? 占位符的实际内容
            #this is the most important config for showing parames like ?
            log4j.logger.org.hibernate.SQL=trace
            log4j.logger.org.hibernate.type=trace
            #above two configs
            log4j.logger.org.hibernate.tool.hbm2ddl=debug
            log4j.logger.org.hibernate.hql=debug
            log4j.logger.org.hibernate.cache=debug


            log4j.logger.org.hibernate.transaction=debug
            log4j.logger.org.hibernate.jdbc=debug
            log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace

              
            log4j.rootLogger=warn, stdout  
            log4j.logger.org.hibernate.type.descriptor.sql.BasicBinder=TRACE



    如果觉得对你有帮助,不妨请我喝杯茶!

    扫描下面支付宝链接。

  • 相关阅读:
    atom 震动特效
    CSRF和XSS
    解决remove @override annotation(jdk1.5和jdk1.6)
    JDK 工具列表
    解决Win10系统backgroundTaskHost占用cpu大
    ideaIU-15.0.2 注册码
    jprofiler_windows-x64_9_1注册码
    修改ligerui 默认确认按钮
    解决 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”
    安装 Flex2packagebeta_1.994
  • 原文地址:https://www.cnblogs.com/VinceYang1994/p/4341971.html
Copyright © 2011-2022 走看看