If I use Spring @ Automated annotation for a class member, can I update the class?

I have a dependent class of the Bclass Athat I want to enter in A.

And so I use annotation @Autowiredin the class A. But the class itself AI create using the keyword new, and I believe that the reference to the class Bis equal null.

So, if you use Autowired, Adoes Spring need to manage the class as well?

I mean, is the link nullbecause I use newand not let Spring manage all of this?

+4
source share
2 answers

, Spring A B, B A.

0

Source: https://habr.com/ru/post/1618589/


All Articles