title: UnsatisfiedDependencyException:Error creating bean with name 'employeeController': Unsatisfied dependency expressed through field 'repository'
body: <p>I am facing the below error:</p>
  <p>-Cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'employeeController': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.demo.EmployeeRepository' available: expected at least 1 bean which qualifies as candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}</p>
  <p>Below is my code(I have not made any service class on purpose,by adding service class same error occurred)</p>
  <p>EmployeeController.java</p>
  <pre class="lang-java prettyprint-override"><code>    @RestController
      public class EmployeeController {
      
          @Autowired
          EmployeeRepository repository;
          
          @PostMapping(&quot;/employee/add&quot;)
          public Employee addEmployee(@RequestBody Employee emp)
          {
              return repository.save(emp);
          }
          
          @GetMapping(&quot;/employee/{id}&quot;)
          public Optional&lt;Employee&gt; getEmployee(@PathVariable Integer id)
          {
              return repository.findById(id);
          }
          
          @PutMapping(&quot;/employee/{id}&quot;)
          public Employee updateEmployee(@PathVariable Integer id,@RequestBody Employee emp)
          {
              Optional&lt;Employee&gt; employee=repository.findById(id);
              if(employee.isPresent())
              {
                  return repository.save(emp);
              }
              else
              {
                  return null;
              }
          }
          
          @DeleteMapping(&quot;/employee/{id}&quot;)
          public String deleteEmployee(@PathVariable Integer id)
          {
              repository.deleteById(id);
              return &quot;Document Deleted&quot;;
          }
              
          }
  </code></pre>
  <p>EmployeeRepository.java</p>
  <pre class="lang-java prettyprint-override"><code>    @Repository
      public interface EmployeeRepository extends CouchbaseRepository&lt;Employee, Integer&gt;{
          
      
      }
  </code></pre>
  <p>I am unable to understand why <code>employeeController</code> is unable to get dependency of <code>employeeRepository</code> when <code>@Autowired</code> has been used. Please let me know what is wrong here</p>