SpringBean Annotations
✅ Bean이 null인 경우 처리 방법 to make bean null @Autowired히고 SpringBean을 넣을지, 안 넣을지 정할 수 있다 💡 Required = false Member이 null이면 setter을 호출하지 않음 @Autowired(required = false) public void s...
✅ Bean이 null인 경우 처리 방법 to make bean null @Autowired히고 SpringBean을 넣을지, 안 넣을지 정할 수 있다 💡 Required = false Member이 null이면 setter을 호출하지 않음 @Autowired(required = false) public void s...
✅ 4 Ways to inject dependency constructor setter field method 💡Constructor dependency injection 👍🏻 recommended Injected at the moment when object is created with constuctor 👍🏻 o...
💡 How to add Bean @Bean등록하는 방법 1️⃣ manual bean configuration with @Configuration 2️⃣ component scan with @ComponentScan, @Autowired 이 게시글에서는 2️⃣번 방법에 대해 설명 ✅ Component Scan Spring d...
✅ Singleton create only one instance(object) of its kind and share among other code, providing a single point of access public class SingletonService { //create myself within myself ...
✅ Spring Container and Bean ✔️ Spring container: manage object creation and DI and overall flow of the application Spring container 🟰 ApplicationContext ✔️ Bean: Objec...
✅ Inversion of Control control flow is inversed from programmer to ➡️ external source(ex: framework) Framework will call my code, not the programmer 👎🏻 Before IoC programmer expli...
✅ What is a good OOP distinguish role and implementation ✔️ role: interface, abstraction what something should do ex) OrderService, MemberRepository ✔️ implementation: class ...
✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
✅ AOP Distinguish between cross-cutting concern and core concern 공통 관심 사항과 핵심 관심 사항을 분리하기 예를 들어 회원가입, 상품 조회, 주문, 구매등 하는 쇼핑몰이 있다고 하자 그런데 성능 측정을 위해 회원가입, 상품 조회, 주문, 구매 메소드 시간을 측정하고 ...
✅ H2 개발, 테스트 용으로 가벼운 DB ✅ pure JDBC JDBC: service가 DB를 access할 수 있도록 해줌 👎🏻 반복되는 코드, resource 반환 코드 등 코드 복잡 Spring DI 덕에 기존 controller, service코드는 만지지 않고 @Configuration클래스만 변경해...