H2, JDBC, JPA, ORM
✅ H2 개발, 테스트 용으로 가벼운 DB ✅ pure JDBC JDBC: service가 DB를 access할 수 있도록 해줌 👎🏻 반복되는 코드, resource 반환 코드 등 코드 복잡 Spring DI 덕에 기존 controller, service코드는 만지지 않고 @Configuration클래스만 변경해...
✅ 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...
List 🆚 Set List: duplication⭕️, index⭕️, used for order Set: duplication❌, no index ❌, used for search ✅ Set uniqueness, no duplication no order, no index fast search ✅ Hash 👍...
✅ Array 👍🏻 use index and input, change, get value: O(1) 배열에는 index가 있기 때문에 👎🏻 search, insert value: O(n), need to search, compare the whole array, 👎🏻 array size is f...
✅ Generic 사용할 타입을 미리 결정하지 않는다, type parameter 결정을 미루기 클래스 생성할 때 타입을 결정하지 않고, 인스턴스 생성 때 타입 결정 when creating class: use type parameter <T> when creating instance: set type when cre...
✅ Why do we need Exception class? 정상 흐름과 예외 흐름을 따로 분리하기 위해 👎🏻 before connect -> send - disconnect하는 코드라면 정상 흐름과 예외 흐름이 섞여서 이 코드가 도대체 어떤 순서로 무엇을 하는지 알기가 어려움 client.initError...