목록2024/07/07 (3)
wintertreey 님의 블로그
@Qualifier@autowired 타입으로 매핑!@Autowired private SenderInter senderInter;라고 해주고 sender, sender2 둘다 인터페이스해주면 expected single matching bean but found 2: sender,sender2라고 에러문구가 뜬다. 인스턴스된 객체가 두개라 에러가 떨어지는것. 해결방법 :@Qualifier("sender")센더인터타입이 두갠데, 그중에 센더와 매핑한다는것.즉 퀄리파이어는 오토와이어드의 보조어노테이션 @Resource @Resource는 @Autowired와 달리 객체변수이름으로 매핑을 한다. pojo란?POJO란 Plain Old Java Object의 약자로, 이를 직역하면 순수한 오래된 자바 객체..
@Scope("Singleton") vs @Scope("prototype")스코프의 기본값이 싱글톤인건 앞서 공부했다. 그렇다면 프로토타입, 싱글톤은 어떤 상황에서 구분해서 사용할 수 있을까 Bank.javapackage pack.bank;public interface Bank { void inputMoney(int money); //입금 void outputMoney(int money); //출금 int getMoney(); //잔고확인}HanaBank.javapackage pack.bank;import org.springframework.context.annotation.Scope;import org.springframework.stereotype.Component;@Component//@Scope(..
수업을 들으며 점점 요구사항을 전체 그림으로 봐야할 필요성을 느끼게 되었다. (중간 플젝때 작업을 하면서, 비루한 나의 밑그림에 승질이 뻗쳤던 기억이..) 암튼. 요즘은 수업마다 하는 아주작은 단위에서조차도 다이어그램을 그려보는것이 어떨까하는생각. 막상 그리려고 하니 어떻게 했지? 싶어 화살표 모양등 다시금 정리하고 넘어가고자한다. https://blog.naver.com/sweety_dnwjd/223417979649?trackingCode=blog_bloghome_searchlist 이건 전에 간단히 기입했던 staruml을 이용한 연습기록. UML 다이어그램은 크게 구조, 행위 두가지로 나뉜다. - 구조 : class, obejct, package, component, depolyment - 행위 :..