Dear Spring Documentation Team,
I hope you are doing well. I wanted to bring to your notice a small inconsistency in the Spring Boot documentation regarding the property spring.jpa.show-sql.
The documentation currently shows: spring.jpa.show-sql: true
However, when using application.properties, the correct syntax should be: spring.jpa.show-sql=true
The colon (:) format is valid for YAML configuration, but not for .properties files. This could cause confusion for developers (especially beginners) referencing the documentation while working with properties-based configuration.
Request: Kindly update the example or include a note clarifying YAML vs .properties syntax to avoid misunderstanding. Thank you for your time and for maintaining such valuable documentation. Please let me know if any additional information is needed.
Warm regards, SANDESH WALKE
Comment From: wilkinsona
Can you please link to the relevant section of the documentation? I suspect you may be referring to this section. Note that the configuration examples are in two formats and the syntax varies. The YAML example uses ::
spring:
jpa:
hibernate:
naming:
physical-strategy: "com.example.MyPhysicalNamingStrategy"
show-sql: true
The properties example uses =:
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategy
spring.jpa.show-sql=true
Comment From: sandeshwalke
Hi Andy, thanks for the clarification.
Yes, I was referring specifically to the .properties format. Here is the section where I saw the spring.jpa.show-sql example written with : instead of =: here's the link https://spring.io/guides/gs/accessing-data-mysql
The page shows:
spring.jpa.show-sql: true
But the correct .properties syntax should be:
spring.jpa.show-sql=true
I understand that the YAML examples use : — this reply helped me see the difference more clearly. However, since the page shows both formats together, adding a note or adjusting the example could help avoid confusion for readers following the .properties configuration.
On Fri, Nov 28, 2025 at 6:49 PM Andy Wilkinson @.***> wrote:
wilkinsona left a comment (spring-projects/spring-boot#48331) https://github.com/spring-projects/spring-boot/issues/48331#issuecomment-3589324252
Can you please link to the relevant section of the documentation? I suspect you may be referring to this section https://docs.spring.io/spring-boot/how-to/data-access.html#howto.data-access.jpa-properties. Note that the configuration examples are in two formats and the syntax varies. The YAML example uses ::
spring: jpa: hibernate: naming: physical-strategy: "com.example.MyPhysicalNamingStrategy" show-sql: true
The properties example uses =:
spring.jpa.hibernate.naming.physical-strategy=com.example.MyPhysicalNamingStrategyspring.jpa.show-sql=true
— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/48331#issuecomment-3589324252, or unsubscribe https://github.com/notifications/unsubscribe-auth/A22CFQHDRAJZRPW7NLDF3RL37BDW5AVCNFSM6AAAAACNPA357KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKOBZGMZDIMRVGI . You are receiving this because you authored the thread.Message ID: @.***>
Comment From: wilkinsona
The getting started guides aren't part of Spring Boot. Please open an issue in the https://github.com/spring-guides/gs-accessing-data-mysql repository.
Also, please note that the syntax isn't incorrect as the properties format supports both : and = as a key-value separator. For consistency, I still think it's worth switching to = though.