분류 전체보기
-
"C:/Users/.../jpashop" not found, either pre-create it or allow remote database creation (not recommended in secure environments)error 2025. 11. 7. 10:06
H2의 3가지 모드임베디드(jdbc:h2:~/jpashop) :애플리케이션(또는 콘솔)에서 직접 파일 생성 및 접근 가능TCP서버(jdbc:h2:tcp://localhost/~/jpashop) : 이미 존재하는 DB 파일에 원격으로 접근 가능In-memory(jdbc:h2:mem:jpashop) : 파일 없이 휘발성으로 운영 TCP 모드에서 새 DB가 자동생성 되지 않는 이유TCP 모드는 서버가 DB 파일을 관리한다 즉, 콘솔은 서버에 요청만 할 수 있기 때문에 새 DB를 마음대로 생성할 수 있게 두면 누군가 임의의 요청으로 서버 파일 시스템 어딘가에 임의의 DB를 만들 수 있게 된다이때 보안 취약점이 되기 때문에 기본적으로 차단된다 자동으로 새 DB 생성을 하게 하려면?임베디드로 한 번 생성하거나 ..
-
프로그래머스 LV2 - 251104알고리즘 2025. 11. 4. 14:34
LV2. 예상 대진표class Solution { public int solution(int n, int a, int b) { int answer = 0; if (a > b) { int temp = a; a = b; b = temp; } // 무조건 a LV2. 연속 부분 수열 합의 개수import java.util.*;class Solution { public int solution(int[] arr) { Set set = new HashSet(); // Arrays.sort(arr); int[] tmpArr = new int[arr.lengt..
-
Jenkins - CI/CD (1)이커머스 devops 2025. 11. 3. 16:07
젠킨스 - 도커 다운로드 - https://www.jenkins.io/download/ - http://localhost:8080/ 로그인- 비밀번호는 도커 데스크탑 logs에서 확인할 수 있다 - 플러그인 설치 > 계정 생성까지 완료했는데 version이 너무 낮다는 경고가 떴다- 도커 이미지 두고 젠킨스 버전만 업데이트하는 방법을 찾아봤는데 이미지 복사했다가 변경했다가 삭제해야 해서 그냥 구버전 젠킨스 이미지 삭제 후 최근 버전으로 다시 설치했다 - docker run -d -p 8080:8080 -p 50000:50000 --name jenkins-server --restart=on-failure jenkins/jenkins:latest - 새 버전 설치 후 똑같이 진행해주면 경고 문구가..
-
프로그래머스 LV2 - 251030알고리즘 2025. 10. 30. 12:46
LV2. N개의 최소공배수class Solution { public int solution(int[] A) { int answer = 1; Arrays.sort(A); for (int i = 0; i LV2. 영어 끝말잇기 import java.util.*;class Solution { public int[] solution(int n, String[] words) { int[] answer = {0, 0}; int faultNo = 0; Set wordSet = new HashSet(); for (int i = 0; i LV2. 멀리 뛰기import java.util.*;class Solution {..
-
프로그래머스 LV2 - 251029알고리즘 2025. 10. 29. 15:28
LV2. 구명보트import java.util.*;class Solution { public int solution(int[] people, int limit) { int answer = 0; Integer[] boxed = Arrays.stream(people).boxed().toArray(Integer[]::new); Arrays.sort(boxed, Comparator.reverseOrder()); int passenger = 0; int cnt = 0; for (int i=0; i limit) { answer ++; passenger =..
-
프로그래머스 LV2 - 251024알고리즘 2025. 10. 24. 16:58
LV2. 피보나치 수class Solution { public int solution(int n) { int[] rslt = new int[n+1]; rslt[0] = 0; rslt[1] = 1; for (int i=2; i생각을 못 했는데 중간에 int 범위를 넘어서 오버플로우가 나는 경우가 있을 수 있다 class Solution { public int solution(int n) { int[] rslt = new int[n+1]; rslt[0] = 0; rslt[1] = 1; for (int i=2; i LV2. 카펫class Solution { pub..
-
프로그래머스 LV2 - 251023알고리즘 2025. 10. 23. 13:01
LV2. 다음 큰 숫자class Solution { public int solution(int n) { String binaryVal = Integer.toBinaryString(n); int oneCnt = countOne(binaryVal); int tmpCnt = 0; int answer = n; while (oneCnt != tmpCnt) { answer++; String tmpBinaryVal = Integer.toBinaryString(answer); tmpCnt = countOne(tmpBinaryVal); } return an..
-
프로그래머스 LV2 - 251022알고리즘 2025. 10. 22. 16:44
LV2. JadenCase 문자열 만들기class Solution { public String solution(String s) { StringBuilder answer = new StringBuilder(); String[] tmpStrList = s.split(""); if (!Character.isDigit(tmpStrList[0].charAt(0))) { tmpStrList[0] = tmpStrList[0].toUpperCase(); } for (int i=1; i LV2. 이진변환 반복하기class Solution { public int[] solution(String s)..