如何将Spring数据查询记录到Couchbase数据库 [英] How to log Spring-data queries to a Couchbase Database

查看:67
本文介绍了如何将Spring数据查询记录到Couchbase数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Spring-Boot 应用程序中,我们有一个 Spring-Data 存储库连接到 Couchbase 服务器.

In my Spring-Boot app we have a Spring-Data repository connection to the Couchbase server.

我知道,连接到SQL Server时,可以通过添加到属性文件行(例如此行)来查看发送到DB的实际查询(

I know that when connecting to SQL server, one can see the actual queries sent to the DB by adding to the property file line such as this one (As mentioned here):

logging.level.org.hibernate.SQL=DEBUG

使用Couchbase时应该怎么做?

What should be the way to do it when using Couchbase?

推荐答案

按照deniswasrosa的回答,我仅通过将其添加到yml文件就能够看到查询:

Following deniswasrosa's answer I was able to see the queries just by adding this to the yml file:

logging:
   level:  
     org.springframework.data.couchbase.repository.query: DEBUG

我不需要添加依赖项.

这篇关于如何将Spring数据查询记录到Couchbase数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆