asked
Yoon Jae-seong's introductory course through hands-on experience for Spring Framework developers
Lecture 7 IoC Container
Written on
·
281
0
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("config/beans.xml");// 별도 설정하지 않으면 빈객체를 자동생성한다고 하셧는데
왜 자동생성이되면서 생성자가 호출되는건가여? 원래 생성되면서 생성자가 호출되는건가여?
Answer 1
생성자는 객체가 생성되면서 호출되는 요소입니다. 빈 객체들이 자동으로 생성되기 때문에 생성자가 호출됩니다.