title: spring data mongodb , use MongoRepository or MongoTemplate?
body: <p>If use MongoRepository, You can have following code: </p>
  
  <pre><code>@Repository
  public interface UserRepo extends MongoRepository&lt;User, String&gt; {
  
      // additional methods go here 
  
  } 
  </code></pre>
  
  <p>then you do userRepo.save() find() etc to do CRUD ops. </p>
  
  <p>or you just MongoTemplate and do CRUD ops. </p>
  
  <p>My question is which is preferred? what are the pros and cons for each approach? Thanks!  </p>