전체 글
-
Jackson ObjectMapper의 동작과정프로젝트/게시판 프로젝트 2022. 6. 20. 11:07
이 글은 아래의 정보들을 다루었습니다. ObjectMapper란? ObjectMapper를 사용하던 중 발생한 에러 발생과 해결방법 ObjectMapper의 동작과정(리플랙션과 기본생성자, Getter/Setter) Object Mapper란? Object Mapper는 데이터의 형식을 변환해줍니다. 아래 예시와 같이 데이터의 형식을 변환할 수 있습니다. Text(Json) -> Object Object -> Text(Json) 보통 Spring에서 api를 개발하다 보면 @ResetController를 많이 사용합니다. 이때 request와 response에서 json -> 객체, 객체 -> json의 과정은 MessageConverter에 의해 처리됩니다. MessageConverter가 json 변..
-
[프로그래머스] 징검다리 건너기 : 2019 카카오 개발자 겨울 인턴십 - 자바(JAVA)알고리즘/프로그래머스 2022. 6. 20. 00:01
https://programmers.co.kr/learn/courses/30/lessons/64062 코딩테스트 연습 - 징검다리 건너기 [2, 4, 5, 3, 2, 1, 4, 2, 5, 1] 3 3 programmers.co.kr 문제 해석 징검다리는 일렬로 놓여 있으며 디딤돌에는 숫자가 적혀 있다. 디딤돌의 숫자는 한번 밟을 때 마다 1씩 줄어든다. 디딤돌의 숫자가 0이되면 더 이상 밟을 수 없다. 그렇게 되면 그 다음 디딤돌로 한번에 여러 칸을 건너 뛰어 가야한다 단, 다음으로 밟을 수 있는 디딤돌이 여러개면 무조건 가장 가까운 디딤돌로만 뛸 수 있다. 한번에 건너 뛸 수 있는 디딤돌의 최대 칸수 k가 주어지기 때문에 만약 다음 디딤돌까지의 거리가 k이상이라면 더 이상 건널 수 없다. 여러명이 징검..
-
데이터베이스 조인의 모든것에 대해서 알아보자CS/데이터베이스 2022. 6. 19. 20:40
정리한 내용은 다음과 같습니다. 전반적인 Join의 개념과 등장 배경 다양한 Join 방법(Inner Join, Outer Join, Self Join, Cross Join) + 옵티마이저와 힌트 맛보기 Join이 실제로 수행되는 과정(Nested Loop Join, Sort Merge Join, Hash Join) 조인이란? 한 데이터베이스 내의 여러 테이블의 레코드를 조합하여 하나의 열로 표현한 것입니다. 글보다는 사진으로 예시를 들어보겠습니다. 한 데이터베이스 내의 여러 테이블의 레코드를 조합하여 하나의 열로 표현한 것입니다. => 한 데이터베이스 내의 사원과 부서 테이블의 레코드(이름, 부서명)를 조합하여 하나의 (이름, 부서명) 테이블로 표현합니다. 조인이 등장하게 된 이유(조인의 필요성) 관계..
-
[프로그래머스] 2020 KAKAO BLIND RECRUITMENT 자물쇠와 열쇠 - 자바(JAVA)알고리즘/프로그래머스 2022. 6. 19. 00:01
https://programmers.co.kr/learn/courses/30/lessons/60059 코딩테스트 연습 - 자물쇠와 열쇠 [[0, 0, 0], [1, 0, 0], [0, 1, 1]] [[1, 1, 1], [1, 1, 0], [1, 0, 1]] true programmers.co.kr 문제 해석 자물쇠는 N*N 크기의 정사각 격자의 형태입니다. 열쇠는 M*M 크기인 정사각 격자의 형태입니다. 자물쇠에는 홈이 파여 있고 열쇠 또한 홈과 돌기 부분이 있습니다. 열쇠는 회전과 이동이 가능하며 열쇠의 돌기 부분을 자물쇠의 홈 부분에 딱 맞게 채우면 자물쇠가 열리는 구조입니다. 열쇠의 돌기와 자물쇠의 돌기가 만나면 안 된다. 모든 홈을 채워 비어있는 곳이 없어야 자물쇠를 열 수 있다. 열쇠로 자물쇠를..
-
[백준] 12100번 : 2048(Easy) - 자바(Java)알고리즘/백준 2022. 6. 18. 00:01
https://www.acmicpc.net/problem/12100 12100번: 2048 (Easy) 첫째 줄에 보드의 크기 N (1 ≤ N ≤ 20)이 주어진다. 둘째 줄부터 N개의 줄에는 게임판의 초기 상태가 주어진다. 0은 빈 칸을 나타내며, 이외의 값은 모두 블록을 나타낸다. 블록에 쓰여 있는 수는 2 www.acmicpc.net 문제 해석 2048게임을 예전에 해본적이 있어서 이해가 어렵지 않았습니다. 만약 간단하게 한번 이 게임을 해본다면 더 이해하기 쉬울 것 같습니다. https://play2048.co/ 2048 Join the numbers and get to the 2048 tile! Careful: this game is extremely addictive! play2048.co 문..
-
[백준] 2056번 : 작업 - 자바(Java)알고리즘/백준 2022. 6. 17. 00:01
https://www.acmicpc.net/problem/2056 2056번: 작업 수행해야 할 작업 N개 (3 ≤ N ≤ 10000)가 있다. 각각의 작업마다 걸리는 시간(1 ≤ 시간 ≤ 100)이 정수로 주어진다. 몇몇 작업들 사이에는 선행 관계라는 게 있어서, 어떤 작업을 수행하기 위해 www.acmicpc.net 문제 해석 수행해야 할 작업이 10000개 주어집니다. 작업들 사이에서는 선행 관계가 존재합니다. K번 작업에 대해 선행 관계에 있는 작업들은 모두 1 이상 K-1 이하입니다. 선행 관계에 있는 작업이 하나도 없는 작업이 반드시 하나 이상 존재합니다. (1번 작업이 항상 그렇다) 작업들은 동시에도 수행이 가능합니다. 모든 작업을 완료하기 위한 필요한 최소 시간을 구하세요 문제 풀이 전 설..
-
Git branch 전략이란?Git 2022. 6. 16. 09:39
Git branch 전략에 대해 알아보기 전에 Branch부터 알아보겠습니다. Git branch란? 브랜치란 독립적으로 어떤 작업을 진행하기 위한 개념입니다. 영어로 나뭇가지라는 뜻을 가지며 실제로 브랜치를 사용하면 나뭇가지처럼 뻗어나가는 그림을 볼 수 있습니다. 이렇게 나뭇가지처럼 뻗어나가 동시에 다양한 작업을 수행하고 나중에 다른 브랜츠와 병합함으로써 작업한 내용을 새로운 하나의 브랜치로 모을 수 있습니다. 보통 저장소를 처음 만들게 되면 Git은 'master'라는 이름의 브랜치를 만듭니다. 보통 새로운 브랜치를 만들어서 사용하지 않으면 모든 작업은 master 브랜치에서 이루어집니다. 우리는 브랜치를 사용할때 master로부터 다양한 브랜치를 뻗어나갈 수 있습니다. A개발자는 새로운 기능을 추가..
-
AWS EC2 build 무한로딩 에러(EC2 메모리 부족 현상 대처)프로젝트/게시판 프로젝트 2022. 6. 16. 02:43
문제가 발생한 상황 문서화 작업을 추가하여 githun에 push 하고 AWS EC2로 접속하여 git pull을 받아 새롭게 REST API 서버를 띄우려고 했습니다. ./gradlew build 명령어를 수행하던 중 테스트 부분에서 더 이상 퍼센티지가 올라가지 않으며 시간만 지나가는 상황이 발생하였습니다. 처음에는 당황하여 SSH를 그냥 닫아버리자 한동안 연결이 되지 않기도 하였습니다. 이후에 상황을 재구성 하였을 때 똑같은 상황이 발생했고 Ctrl + Z를 사용하여 해당 쉘 스크립트로부터 빠져나오고 그 뒤로부터는 EC2 환경에 엄청나게 버벅거리기 시작합니다. 이후에 sar 명령어를 사용하여 시스템 자원을 얼마나 사용하고 있는지 확인하고자 하였는데 메모리 사용량이 95%에 육박한 것 같았습니다. 저와..