I was trying to check some piece of code within spring framework where the autowired functionality is coded.
Let me give you an example.
@Component
public lass Service{
@Autowired
private DaoLayer daoLayer;
}
My question is: How spring can inject the DaoLayer or any instance when the respective field is marked using Autowired.
- Make this using reflection? , if reflection is used: Does reflection can access private fields?
- Make this using a new created proxy? and inject the references on it?, if this happens what happens when getters and setters are not present?
- Use other technique and which one?
Could anyone could point me where I can find this information or explain me more about this process.
I remember in sring2.5 getters and setter need to be present but no more in spring3.2, so now spring created them by its own? or are not used anymore?
Thanks.