title: Error while creating a bean : unsatisfied dependency expressed
body: <p><strong>@Controller</strong></p>
  
  <pre><code>@Controller
  public class ControllerClass {
      @Autowired
      ServiceClass serviceClass;
  
      @RequestMapping("/")
      public String getAll(Model model) {
          System.out.println(serviceClass.getAll());
          model.addAttribute("contents", serviceClass.getAll());
          return "NewFile";
      }
  }
  </code></pre>
  
  <p><strong>Repository</strong></p>
  
  <pre><code>@Repository
  public interface RepositiryClass {
  
      List&lt;Domain&gt; get();
  }
  </code></pre>
  
  <p><strong>RepoImpl</strong></p>
  
  <pre><code>public class RepoImpl implements RepositiryClass {
  
      @Override
      public List&lt;Domain&gt; get() {
          List&lt;Domain&gt; dList = new ArrayList&lt;&gt;();
          Domain one = new Domain("testOne", "testTwo");
          Domain two = new Domain("testTwo", "TestOne");
          Domain three = new Domain("three", "three");
  
          dList.add(one);
          dList.add(two);
          dList.add(three);
  
          return dList;
      }
  </code></pre>
  
  <p><strong>@Service</strong></p>
  
  <pre><code>@Service
  public interface ServiceClass {
  
      List&lt;Domain&gt; getAll();
  }
  </code></pre>
  
  <p><strong>ServiceClassImpl</strong></p>
  
  <pre><code>public class ServiceClassImpl implements ServiceClass {
  
      @Autowired
      RepositiryClass repositriyClass;
  
      @Override
      public List&lt;Domain&gt; getAll() {
  
          return repositriyClass.get();
      }
  
  }
  </code></pre>
  
  <p><strong>Exception</strong></p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controllerClass': Unsatisfied dependency expressed through field 'serviceClass': No qualifying bean of type [com.controller.domain.service.ServiceClass] found for dependency [com.controller.domain.service.ServiceClass]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.controller.domain.service.ServiceClass] found for dependency [com.controller.domain.service.ServiceClass]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
      at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
  </code></pre>
  
  <p><strong>root cause</strong></p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceClassImpl': Unsatisfied dependency expressed through field 'repositriyClass': No qualifying bean of type [com.controller.domain.repo.RepositiryClass] found for dependency [com.controller.domain.repo.RepositiryClass]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.controller.domain.repo.RepositiryClass] found for dependency [com.controller.domain.repo.RepositiryClass]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
      org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
  </code></pre>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;servlet&gt;
          &lt;servlet-name&gt;dispatcherServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;dispatcherServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><strong>dispatcherServlet-servlet.xml</strong></p>
  
  <pre><code>&lt;mvc:annotation-driven /&gt;
      &lt;context:component-scan base-package="com.*" /&gt;
      &lt;bean
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p><strong>package declaration</strong></p>
  
  <p><a href="https://i.stack.imgur.com/jMWMN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jMWMN.png" alt="enter image description here"></a></p>
  
  <p>After Searching various forms, I am still not able to solve that
  Why I am getting this error as I have everyting implemented and still not sure why I'm getting this error and how to solve that.</p>
  
  <p>Thanks</p>