Hỏi & Đáp
싱글톤 stateless 관련 질문입니다.
ApplicationContext ac2= new AnnotationConfigApplicationContext(AppConfig. class ) ; MemberServiceImpl m1=ac2.getBean( "memberService" , MemberServiceImpl. class ) ; MemberServiceImpl m2=ac2.getBean( "memberService" , MemberServiceImpl. class ) ; System. out .println(m1.getMemberRepository()) ; System. out .println(m2.getMemberRepository()) ; 테스트 코드를 위와같이 작성해서 그런거였네요.. . 해결됐습니당!!
- Lượt thích
- 0
- Số bình luận
- 1
- Lượt xem
- 404

