Spring Boot:spring.jpa.show-sql属性不适用于数据存储区

时间:2019-06-14 13:36:41

标签: spring-boot google-cloud-datastore

我有一个适用于Google数据存储的应用程序。为了使用数据库,我使用JPA。存储库从DatastoreRepository实现org.springframework.cloud.gcp.data.datastore.repository

我想查看应用程序对数据库进行的所有查询,因此我将spring.jpa.show-sql设置为true,但是对我来说不起作用。

有人有同样的问题吗?怎么解决?

编辑

项目依赖项:

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'

谢谢

1 个答案:

答案 0 :(得分:1)

您可以尝试添加数据源代理:

有文档:the documentation

这是Spring Boot的示例:

https://github.com/ttddyy/datasource-proxy