SpringCloud 结合 MongoTemplate 打印执行语句log

在调度MongoTemplate的时候,我们无法确定我们写的方法是否能发出正确的语句,这时候我们需要将语句给打印出来。

9028759-33cfffb3f287e84e.png
springcloud

使用方法

在application.yml文件中增加如下配置即可

 logging:
  level:
    org.springframework.data.mongodb.core.MongoTemplate: DEBUG

9028759-07315bb8dadcd082.png

猜你喜欢

转载自blog.csdn.net/weixin_33811961/article/details/90840073