如何在spring-boot中设置hibernate.format_sql? [英] How to set hibernate.format_sql in spring-boot?
本文介绍了如何在spring-boot中设置hibernate.format_sql?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 spring-boot
自动配置进行数据库注入,并定义了属性:
I'm using spring-boot
autoconfiguration for database injection, with properties defined:
spring.jpa.database=POSTGRESQL
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
但是如何设置 hibernate.format_sql = true
?春季启动不支持吗?
But how can I set the hibernate.format_sql=true
? Is that not supported by spring boot?
推荐答案
Spring Boot将允许您使用以下命令设置任何可用的hibernate属性:
Spring Boot will let you set any available hibernate property using:
spring.jpa.properties。*
所以 spring.jpa.properties.hibernate.format_sql = true
也可以。
查看这个部分文档
这篇关于如何在spring-boot中设置hibernate.format_sql?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文