title: Why we firstly make repository and then services and again from repository we implements services ? Please check the code you'll understand?
body: <pre><code>public interface CrudRepository{
    Test createThis(Test t);
  }
  
  @Repository
  public class TestCrud implements CrudRepository{
     public Test createThis(Test t)
  {
       //implementation 
  }
  </code></pre>
  
  <p>}</p>
  
  <hr>
  
  <p>Now the service interface and implementation </p>
  
  <pre><code>   public interface CrudService{
       Test createThis(Test t);
     }
  </code></pre>
  
  <p>@Service
  public class TestService implements CrudService{</p>
  
  <pre><code>    @AutoWired
      CrudRepository crudR;
  
      public Test createThis(Test t){
             crudR.createThis(t)
      }
  </code></pre>
  
  <p>}</p>
  
  <p>When we use to develop web project with spring first we do interface then we implement in repository than 
  we do again interface and from repository we implement the service . Again the same why don't we use directly the
   repository in controller but we do this ? I hope that someone can explain to me</p>