how to show query while using query annotations with MongoRepository with spring data
<p>I'm using MongoRepository in spring boot to access mongo:</p>

<pre><code>public interface MongoReadRepository extends MongoRepository&lt;User, String&gt; {
    @Query(value = "{$where: 'this.name == ?0'}", count = true)
    public Long countName(String name);
}
</code></pre>

<p>and it could work, but i wonder know the exactly query it accessing mongo</p>

<p>how to do that?</p>

<p>i try to adding some config at properties like below:</p>

<pre><code>logging.level.org.springframework.data.mongodb.core.MongoTemplate=DEBUG
logging.level.org.springframework.data.mongodb.repository.Query=DEBUG
</code></pre>

<p>and don't work.</p>

<p>could somebody help?</p>