When we use JPA we have spring.jpa.show-sql=false
to enable logging of SQL statements.
How can enable logging of MongoDb queries on Spring Data JPA
Just enable the DEBUG logging level for MongoTemplate on application.properties file...
logging.level.org.springframework.data.mongodb.core.MongoTemplate=DEBUG
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.