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



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

    扫描下面支付宝链接。

  • 相关阅读:
    线程池参数详解
    线程池各个参数详解以及如何自定义线程池
    fastdfs 安装
    SQL 执行顺序
    《SQL 进阶教程》 查找局部不一致的数据
    redis 高性能的原因
    一致性hash
    环境部署数据库报错
    redis 常用命令
    redis 高级学习和应用场景
  • 原文地址:https://www.cnblogs.com/VinceYang1994/p/4341971.html
Copyright © 2011-2022 走看看