Вызывается ли конструктор по умолчанию во время внедрения bean-компонента? ⇐ JAVA
-
Гость
Вызывается ли конструктор по умолчанию во время внедрения bean-компонента?
Lets say I have class A and B
class A{ } class B{ A a; B(){ System.out.print("Hello"); a = something; } } Now I have a bean.xml file where I create a bean of A and B and inject A into B. If the default constructor is called while creating the bean of B, will the value of property A be overwritten by bean injection?
Источник: https://stackoverflow.com/questions/781 ... -injection
Lets say I have class A and B
class A{ } class B{ A a; B(){ System.out.print("Hello"); a = something; } } Now I have a bean.xml file where I create a bean of A and B and inject A into B. If the default constructor is called while creating the bean of B, will the value of property A be overwritten by bean injection?
Источник: https://stackoverflow.com/questions/781 ... -injection
Мобильная версия