I\'m using MongoRepository in spring boot to access mongo:
public interface MongoReadRepository extends MongoRepository {
@Query(valu
This is a late answer but I found the correct answer hasn't been given yet based on the question.
The answer already given by the people may be valid for other scenarios. But, if you are using the MongoRepository
then the correct configuration would be the following:
logging.level.org.springframework.data.mongodb.repository.query= debug
You are using the Query
in your configuration instead of query
which is wrong.
When you add correct configuration then the logger would be like:
25-06-2020 17:58:43.301 [http-nio-9001-exec-10] DEBUG o.s.d.m.r.query.MongoQueryCreator.complete(162) - Created query Query: { "customer.id" : 2}, Fields: {}, Sort: {}