For formatting the SQL statements in a Spring Boot application, we can set hibernate.format_sql in the application.properties as follows:
spring.jpa.properties.hibernate.format_sql= true