Spring Boot项目JPA配置项format-sql不生效的情况

Spring Boot项目的application.properties/application.yml配置文件中,JPA打印SQL日志格式化输出配置项spring.jpa.properties.hibernate.format-sql=true不生效,需要改为spring.jpa.properties.hibernate.format_sql=true才有效果。
附上个别JPA相关配置项:

spring.jpa.database-platform=org.hibernate.dialect.SQLServer2012Dialect
spring.jpa.open-in-view=false
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
posted @ 2021-01-11 14:04  SHI0ELD  阅读(2232)  评论(0)    收藏  举报