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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM