title: Confusion about how an @autowire declaration is placed on a protected variable of a parent class/interface. How is this being autowired?
body: <p>I have inherited some Spring MVC project code.</p>
  
  <p>There is an MVC <code>PortfolioController</code> in which a handler method called <code>aggregate()</code> uses a <code>user</code> object variable freely through out the method. Its declaration is not listed any where in <code>PortfolioContoller</code> class but when I rightclick it eclipse say's it's Autowired. I click on it and it takes me to the spring xml file the user variable type is declared in. (the type is UserInfo).<br>
  The actual user variable declaration exists in a parent <code>AbstractGenericController</code> class that is actually residing in a completely different project package called commons.  And oddly the user variable is marked <strong>protected</strong>. Even the getter getUser() is marked protected. 
  I am assuming since PortfolioController is extending the GenericController Spring know’s how to autowire an object even if it’s in a different project package (commons). 
  Is this the reason Spring is able to autowire the protected member or is it because of some maven magic where we install commons and it gets somehow packaged in with the MVC controllers project?</p>