在sping与hibernate整合中可以这样的设置

<property name="hibernateProperties">
    <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">true</prop>
    </props>
</property>

在hibernate中这样设置

<property name="format_sql">true</property>

这样格式化的作用是为了Hibernate在输出sql语句的时候让格式更好看一点 不然会是一行  很难看。

相关文章:

  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2021-04-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-06-07
相关资源
相似解决方案