title: if there are more than one classes implementing one interface ,then how does @autowired work?
body: <p>(spring mvc)first i do not know whether the writing below are right or not.if it is right ,then i don't understand how the @autowired works here.if it is wrong , then how i should do when i have more than one classes to implement one interface.</p>
  
  <pre><code>public interface UserDao{
      public User findUserByUserName(String username);
  }
  
  public class UserDaoImpl1 implements UserDao{
  
      @Override
      public User findUserByUserName(String username){
              .......
      }
  }
  
  public class UserDaoImpl2 implements UserDao{
      @Override
      public User findUserByUserName(String username){
              .......
      }
  }
  
  @Service
  public class UserServiceImpl implements UserService{
  
      @Autowired
      private UserDao userDao;//how does atuowired work here?
  
      @Override
      public User loginCheck(User user){
                  ......
          }
  }
  </code></pre>