title: Unable to instantiate Spring MVC Controller
body: <p>I am new to Spring, and have a simple problem.
  I have written a simple controller with a simple constructor, annotated as shown below.</p>
  
  <pre><code>@Controller
  public class LoginController
  {
     private LoginService loginService;
  
     @Inject
     public LoginController(LoginService loginService)
     {
        System.out.println("LoginController constructor - initializing  login service");
        this.loginService = loginService;
     }
  </code></pre>
  
  <p>When I try to access my web app in a browser, I get the following error:
   No default constructor found;</p>
  
  <p>When I replace the <strong>@Inject</strong> annotation with the <strong>@Autowired</strong> annotation, it works.  Can anyone explain why?  Everything I've read says that have identical behavior.  I'm using Tomcat 6.0.43.</p>
  
  <p>Also, below is my spring dispatcher servlet xml:</p>
  
  <pre><code>&lt;mvc:resources mapping="/resources/**" location="/resources/" /&gt;    
  &lt;mvc:annotation-driven/&gt;                                            
  
  &lt;context:component-scan base-package="com.rockwell_collins.webquery"/&gt;  
  
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
     &lt;property name="viewClass"   value="org.springframework.web.servlet.view.JstlView"/&gt;
     &lt;property name="prefix"    value="/WEB-INF/views/"/&gt;
     &lt;property name="suffix"    value=".jsp"/&gt;
  &lt;/bean&gt;
  </code></pre>