본문 바로가기

분류 전체보기250

2024-05-26(배포, docker-compose, Spring Cloud, Github Actions) 이번 캡스톤 프로젝트에서 배포를 맞게 되었고Spring Cloud를 처음 사용해보며 여러 작업을 하고 있다.docker-compose를 이용하여 컨테이너가 같은 도커 네트워크 환경을 공유할 수 있도록 하였고 MSA의 장점에 걸맞게 스케일 아웃했을 때 서버가 중단되지 않고 배포가 되는무중단 배포를 위해 Makefile를 제작하였다.(필자의 생각에 근거하여 Makefile을 작성하였기 때문에 이게 옳은 방법이라곤 할 수 없다.)  Makefile 초안(지금은 조금 다름).PHONY: up downup: docker-compose pull docker-compose up -d zookeeper kafka discovery-service gateway-service redis-user .. 2024. 5. 26.
[goorm] Dead Or Arrive - Java import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class DeadOrArrive { static class Car{ int v; int w; int number; public Car(int v, int w, int number){ this.v = v; this.w = w; this.number = number; } } public static .. 2024. 5. 21.
[백준] 구간 나누기2 - Python 13397 # 8 3# 1 5 4 6 2 1 3 7# [1, 1, 2, 3, 4, 5, 6, 7]import sysinput = sys.stdin.readlinedef check(target): global arr, M now_min = now_max = arr[0] count = 1 for i in range(len(arr)): now_min = min(now_min, arr[i]) now_max = max(now_max, arr[i]) if now_max - now_min > target: count += 1 now_max = now_min = arr[i] # print("count", count, targe.. 2024. 5. 19.
[백준] 같이 눈사람 만들래? - Python 20366 # 5# 3 5 2 5 9## 2 3 5 5 9#import sysinput = sys.stdin.readlineT = int(input().rstrip())nums = list(map(int, input().split()))nums.sort()result = sys.maxsizefor i in range(len(nums)): for j in range(i + 3, len(nums)): l = i + 1 r = j - 1 while l abs(temp): result = abs(temp) if temp 2024. 5. 15.
[백준] 말이 되고픈 원숭이 - Java 1600 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.LinkedList;import java.util.Queue;import java.util.StringTokenizer;public class Main { /** * 입력) * 1 * 4 4 * 0 0 0 0 * 1 0 0 0 * 0 0 1 0 * 0 1 0 0 * * 출력) * 4 */ static int N; static int M; static int K; static int[][] grid; stat.. 2024. 5. 14.
2024-05-11 네이티브 쿼리 사용시 기존의 JPA에서 사용하던 DTO 직접 반환이 어렵다. 따라서, 관련 필드를 받아들이는 인터페이스를 생성한 뒤,해당 인터페이스로부터 데이터를 불러들이는 새로운 DTO를 생성하여야 한다. 관련한 포스팅을 추후에 다뤄야겠다. 또한, Slice도 구현을 하였는데 Slice에 대해 간략히 설명하면Page와는 다르게 카운트 쿼리가 나가지 않아 무한 스크롤에 좀 더 적합한 방식이다.관련하여 포스팅으로 또 다루겠다. 2024. 5. 11.