Skip to content

Commit 13c6f18

Browse files
author
Piotr Kubicki
committed
fix(pom): adjust config for JPA
1 parent a4694e8 commit 13c6f18

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
application.title=Appointment Booking Application
22

3-
spring.application.name=appointment-booking
4-
53
management.endpoint.health.show-components=always
64
management.endpoint.health.show-details=always
75
management.endpoints.web.exposure.include=*
86

7+
spring.application.name=appointment-booking
8+
99
spring.h2.console.enabled=true
1010

1111
spring.datasource.url=jdbc:h2:mem:appointmentbooking
1212
spring.datasource.username=sa
1313
spring.datasource.password=password
1414

15-
spring.flyway.locations=classpath:db/migration
1615
spring.flyway.enabled=true
1716

1817
# Hibernate DDL-auto is recommended as 'none' when using Flyway for migrations
1918
spring.jpa.hibernate.ddl-auto=none
2019

21-
# Show SQL queries in logs for easier debugging
20+
# To avoid potential lazy loading issues in the view layer, disable OSIV (Open Session in View) which is enabled by default in Spring Boot:
21+
spring.jpa.open-in-view=false
22+
23+
# Show SQL queries in logs for easier debugging (just for development purposes)
2224
spring.jpa.show-sql=true
25+
# To beautify or pretty-print the logged SQL (see above), we can add:
26+
spring.jpa.properties.hibernate.format_sql=true
2327

2428
spring.banner.location=classpath:/banner/jbd_banner.txt

0 commit comments

Comments
 (0)