Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit d12ce0c

Browse files
committed
Add additional properties for debugging, with comments
1 parent 9b54e8d commit d12ce0c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/resources/application.properties.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@ spring.flyway.baselineOnMigrate=true
1212

1313
spring.datasource.driver-class-name=org.postgresql.Driver
1414

15+
# This property when set to true makes it so that a DB transaction is open through the body of a request, nullifying the use of @Transactional.
16+
# It is generally recommended that this be set to false, and methods are properly annotated and release the transactions when complete.
17+
# However, many of the endpoints already rely on this kind of connection infrastructure and changing is more trouble than it's worth.
18+
spring.jpa.open-in-view=true
19+
1520
spring.jpa.properties.hibernate.jdbc.batch_size=50
1621
spring.jpa.properties.hibernate.order_inserts=true
1722
spring.jpa.properties.hibernate.order_updates=true
1823
spring.jpa.hibernate.ddl-auto=validate
24+
25+
# Use these to help debug queries.
26+
# The stats will tell you how long hibernate transactions are taking, how many queries occur, how many entities are being flushed/accessed, etc.
1927
spring.jpa.show-sql=false
28+
spring.jpa.properties.hibernate.generate_statistics=false
2029

2130
spring.mvc.dispatch-options-request=true
2231

0 commit comments

Comments
 (0)