取消spring boot 中控制台打印hibernate的统计信息

hibernate的统计信息

2021-09-15 10:33:41.574  INFO 4908 --- [  restartedMain] i.StatisticalLoggingSessionEventListener : Session Metrics {
    0 nanoseconds spent acquiring 0 JDBC connections;
    0 nanoseconds spent releasing 0 JDBC connections;
    0 nanoseconds spent preparing 0 JDBC statements;
    0 nanoseconds spent executing 0 JDBC statements;
    0 nanoseconds spent executing 0 JDBC batches;
    0 nanoseconds spent performing 0 L2C puts;
    0 nanoseconds spent performing 0 L2C hits;
    0 nanoseconds spent performing 0 L2C misses;
    0 nanoseconds spent executing 0 flushes (flushing a total of 0 entities and 0 collections);
    0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}

原来

<prop key="hibernate.generate_statistics">true</prop>

提供了hibernate.generate_statistics属性,该属性提供了Hibernate应用中操作的统计信息,必须在hibernate.cfg.xml文件中进行配置。该属性在配置文件中的默认值是关闭的,因为它会消耗一些资源,但是它很适合在我们开发过程中调试程序时使用。

改为false即可以消息

<prop key="hibernate.generate_statistics">false</prop>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值