본 포스팅은 마틴 파울러의 원글을 번역한 것입니다. 의역 및 오역(사실상 발번역)이 있을 수 있으므로 원글로 읽어보시는 것을 권장합니다. 발번역에 대해 적극적/공격적 피드백 환영입니다 🤩 Mock이라는 용어는 테스트를 위해 실제 객체를 모방한 특수한 객체를 설명하는 데 널리 사용되었습니다. 현재 대부분의 언어 환경에는 Mock 객체를 쉽게 생성하기 위한 프레임워크가 있습니다. 그러나 Mock 객체는 특수한 경우의 테스트를 가능하게하는 하나의 형태에 불과하다는 것을 우리는 종종 깨닫지 못하곤 합니다. 이 글에서는 Mock 객체가 어떻게 작동하는지, 어떻게 동작 검증 기반 테스트를 장려하는지, 관련된 커뮤니티에서 다른 스타일의 테스트를 개발하기 위해 Mock 객체를 어떻게 사용하는지를 설명합니다. Mock이..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given an integer array nums and an integer k. In one operation, you can pick two numbers from the array whose sum equals k and remove them from the array. Return the maximum number of operations you can perform on the array. Example 1: Input: nums = [1,2,3,4], k = 5 Output: 2 Explanation: Starting with nums = [1,2,3,4]: - Remove numbers 1 and 4, then ..
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (commit hash: 42fb381) > git clone https://github.com/lcalmsky/spring-boot-app.git > git checkout 42fb381 ℹ️ squash merge를 사용해 기존 branch를 삭제하기로 하여 앞으로는 commit hash로 포스팅 시점의 소스 코드를 공유할 예정입니다. Overview 모임 만들기 기능을 구현합니다. Endpoint 수정 모임 생성 API를 EventController에 추가합니다. /src/main/java/io/lcalmsky/app/event/endpoint/EventController...
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (commit hash: 6a61511) > git clone https://github.com/lcalmsky/spring-boot-app.git > git checkout 6a61511 ℹ️ squash merge를 사용해 기존 branch를 삭제하기로 하여 앞으로는 commit hash로 포스팅 시점의 소스 코드를 공유할 예정입니다. Overview 스터디 내 모임 만들기 뷰를 구현합니다. Endpoint 작성 먼저 event 패키지를 생성하고 하위에 EventController 클래스를 생성합니다. /src/main/java/io/lcalmsky/app/event/endp..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem You are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover the tree without changing its structure. Example 1: Input: root = [1,3,null,null,2] Output: [3,1,null,null,2] Explanation: 3 cannot be a left child of 1 because 3 > 1. Swapping 1 and 3 makes the BST valid.Example 2: Input: r..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace character. Note that after backspacing an empty text, the text will continue empty. Example 1: Input: s = "ab#c", t = "ad#c" Output: true Explanation: Both s and t become "ac". Example 2: Input: s = "ab##", t = "c#d#" Output: tru..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. Implement KthLargest class: KthLargest(int k, int[] nums) Initializes the object with the integer k and the stream of integers nums. int add(int val) Appends the integer val to the stream and returns the elemen..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Design a HashSet without using any built-in hash table libraries. Implement MyHashSet class: void add(key) Inserts the value key into the HashSet. bool contains(key) Returns whether the value key exists in the HashSet or not. void remove(key) Removes the value key in the HashSet. If key does not exist in the HashSet, do nothing. Example 1: Input ["MyHashSet",..
소스 코드는 여기 있습니다. 문제는 여기 있습니다. Problem Given an array nums which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum among these m subarrays. Example 1: Input: nums = [7,2,5,10,8], m = 2 Output: 18 Explanation: There are four ways to split nums into two subarrays. The best way is to split ..
본 포스팅은 백기선님의 스프링과 JPA 기반 웹 애플리케이션 개발 강의를 참고하여 작성하였습니다. 소스 코드는 여기 있습니다. (commit hash: 49137fc) > git clone https://github.com/lcalmsky/spring-boot-app.git > git checkout 49137fc ℹ️ squash merge를 사용해 기존 branch를 삭제하기로 하여 앞으로는 commit hash로 포스팅 시점의 소스 코드를 공유할 예정입니다. Overview 모임(Event)과 참가(Enrollment) 두 개의 Entity를 설계하고 기존 Entity와의 관계를 설정합니다. 설계 먼저 Entity 관계는 아래와 같습니다. Event는 Study, Account를 참조할 수 있는 단..
- Total
- Today
- Yesterday
- 스프링 데이터 jpa
- 함께 자라기
- 함께 자라기 후기
- @ManyToOne
- 스프링 부트 애플리케이션
- spring boot application
- 헥사고날 아키텍처
- QueryDSL
- Spring Boot JPA
- r
- JSON
- Jackson
- 스프링 부트
- Spring Data JPA
- spring boot app
- Linux
- proto3
- Spring Boot Tutorial
- spring boot jwt
- leetcode
- 스프링부트
- gRPC
- JPA
- Java
- 스프링 부트 회원 가입
- 알고리즘
- 클린 아키텍처
- 스프링 부트 튜토리얼
- intellij
- Spring Boot
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |