Issue
I have an application that works with Google Datastore. In order to work with database I use JPA. The repository implements DatastoreRepository
from org.springframework.cloud.gcp.data.datastore.repository
.
I want to see all queries that application makes to database so I set spring.jpa.show-sql
to true
but it doesn't work for me.
Does anybody have same issue? How can it be fixed?
EDIT
Dependencies in project:
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-gcp-starter-data-datastore:1.1.1.RELEASE'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
Thanks
Solution
You could try to add a datasource proxy:
There is the documentation: https://github.com/ttddyy/datasource-proxy
And here is a example with Spring Boot:
Answered By - Simon Martinelli
Answer Checked By - David Marino (JavaFixing Volunteer)