i'm just starting to learn the Spring framework and I'm just curious about how spring auto-wires a bean to another bean's private variable that has no setter methods. For example, I have a DependentBean which is dependent to a DependedBean...
@Component
public class DependentBean {
@Autowired
private DependedBean dependedBean; //this class has no "setDependedBean" setter method..
}
and for the DependedBean...
@Component
public class DependedBean{
...
}
When the spring boot application starts, it can set the dependedBean of the DependentBean even if the DependentBean object has no setter method for setting its dependedBean attribute. How does spring do that? I'm just curious...