강의

멘토링

커뮤니티

Inflearn Community Q&A

yuyu4093002346's profile image
yuyu4093002346

asked

Yoon Jae-seong's introductory course through hands-on experience for Spring Framework developers

Lecture 15: Registering Beans using Java Code

질문이용

Written on

·

231

0

testbean1 t2 = ctx1.getBean("java600", testbean1.class); System.out.printf("java600 : %s\n",t2);
 
이 코드를 실행시켰을 때 왜 TestBean1의 생성자는 안 출력이 안되고 주소값만 출력이 되나요?
객체가 생성됐으니까 생성자부분도 실행되고, 주소값도 받아오고 해야하는거 아닌가요??
 
강의 22:31 부분입니다.
javaspring

Answer 1

0

softcampus님의 프로필 이미지
softcampus
Instructor

강의에 보시면 testbean1 은 싱글톤으로 정의된 빈으로 객체는 한 번만 생성되어 생성자가 제일위에서 한번만 호출 됩니다

yuyu4093002346's profile image
yuyu4093002346

asked

Ask a question