I am a newbie in Spring Framework and I came across the below POJO beans:
@Component
Class A{
@Autowired
B b;
}
@Component
Class B{
// primitive variables
}
My doubt is what will be the order of initialisation and injection of beans? Will it be:
- Instance of A is created(Constructor is called of A)
- Instance of B is created(Constructor is called of B)
- B is injected into A
OR
- Instance of B is created(Constructor is called of B)
- Instance of A is created(Constructor is called of A)
- B is injected into A