IoC, DI
✅ 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...
✅ 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클래스만 변경해...
📌 Summary ✔️ Optional if there is possibility to be null, Optional and use ifPresent ✔️ Test code: given, when, then Asssertions.assertThat() for exceptions, use Assertions.as...
☑️ Spring Spring: allows to create web with OOP ☑️ Spring-boot-starter-web gradle: build 자동화, 의존성 관리 tomcat: localhost 8080에 올리게 도와주는 웹서버 spring-webmvc thymeleaf: html에 view를 도와주는 l...
✅ Iterable, Iterator 처음부터 끝까지 순회하기 array: iterate with index node: iterate with node reference(before and after node) tree: iterate with parent node, child node ➡️ Java provides iterato...
✅ Stack LIFO: Last in First Out push() pop() ✅ Queue FIFO : First in First Out offer() poll() ✅ Deque Double End Queue queue with both sides open queue ➕ stack Stack에서...
✅ Map key ➕ value key: unique value: duplication possible no order ☑️ HashMap key ➕ value add, search value: O(1) no order get all: random O(1) must override hashCode() an...