I'm using MongoRepository in spring boot to access mongo:
public interface MongoReadRepository extends MongoRepository<User, String> {
@Query(value = "{$where: 'this.name == ?0'}", count = true)
public Long countName(String name);
}
and it could work, but i wonder know the exactly query it accessing mongo
how to do that?
i try to adding some config at properties like below:
logging.level.org.springframework.data.mongodb.core.MongoTemplate=DEBUG
logging.level.org.springframework.data.mongodb.repository.Query=DEBUG
and don't work.
could somebody help?