title: Spring Boot bean creation/injection issue
body: <p>I have spring boot application where I am stuck not sure what's wrong in my code. It gives me error of beans creation. I have used @Autowired, but not sure what's wrong.</p>
  
  <p>Main.Java</p>
  
  <pre><code>@SpringBootApplication
  public class Application
  {
      public static void main(String[] args)
      {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>UserWS.java</p>
  
  <pre><code>@Controller
  public class UserWS
  {
  
      @Autowired
      UserService userService;
  
      @RequestMapping(value = URLConstants.ADD, method = RequestMethod.POST)
      @ResponseBody
      public ResponseEntity&lt;Status&gt; add(@RequestBody User user) throws PeerRateException
      {
          try
          {
              userService.addUser(user);
              Status status = PeerUtils.getSuccessStatus();
              status.setObject(null);
              return new ResponseEntity&lt;&gt;(status, HttpStatus.OK);
          }
          catch (Throwable t)
          {
              throw new PeerRateException(ExceptionConstants.USER_CREATE_CODE, ExceptionConstants.USER_CREATE, t);
          }
      }
  }
  </code></pre>
  
  <p>UserService.Java</p>
  
  <pre><code>@Component
  public class UserService
  {
  
      @Autowired
      private UserDao userDao;
  
      public void addUser(User user)
      {
          userDao.save(user);
      }
  
  }
  </code></pre>
  
  <p>UserDao.java</p>
  
  <pre><code>@Transactional
  public interface UserDao extends CrudRepository&lt;User, Long&gt;
  {
  
  }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>com.hk.peerrate.main
      Main.java
  com.hk.peerrate.service
      UserService.java
  com.hk.peerrate.ws
      UserWS.java
  </code></pre>