SpringCloud 结合 MongoTemplate 打印执
2019-07-10 本文已影响0人
kikiki2
在调度MongoTemplate的时候,我们无法确定我们写的方法是否能发出正确的语句,这时候我们需要将语句给打印出来。
![](https://img.haomeiwen.com/i9028759/33cfffb3f287e84e.png)
使用方法
在application.yml文件中增加如下配置即可
logging:
level:
org.springframework.data.mongodb.core.MongoTemplate: DEBUG
![](https://img.haomeiwen.com/i9028759/07315bb8dadcd082.png)
在调度MongoTemplate的时候,我们无法确定我们写的方法是否能发出正确的语句,这时候我们需要将语句给打印出来。
在application.yml文件中增加如下配置即可
logging:
level:
org.springframework.data.mongodb.core.MongoTemplate: DEBUG