---
title: "格式化Hibernate的SQL输出语句"
author: "ware"
date: "2010-12-08T17:22:04Z"
tags: []
categories: ["企业架构"]
slug: "hibernate-sql"
draft: false
lastmod: "2010-12-08T17:22:04Z"
id: 836884
url: "https://ware.iteye.com/blog/836884"
---

在 applicationContent.xml 文件中加入以下程序代码,及可以Console中看到 Hibernate 执行sql 语句.
<props>
  <prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
  </prop>
  <prop key="hibernate.show_sql">true</prop>
  <prop key="hibernate.format_sql">true</prop>
  <prop key="hibernate.use_sql_comments">false</prop>
</props>