본문 바로가기

개발

(23)
REST API https://rumbling-bear-8d2.notion.site/RESTful-API-API-a2c9507e91ff44b7aa032e5acffa3ac6 RESTful API (휴식스러운 API) 📌 REST API란? rumbling-bear-8d2.notion.site 제가 직접 작성한 글입니다. REST API란? 사람들이 'REST API'라는 용어를 사용할 때 일반적으로 사전 정의된 URL 집합을 HTTP 프로토콜을 사용하여 API를 접근하는 것을 뜻합니다. 출처: How to Use Our REST APIs 깨알지식 실제 REST는 하이퍼미디어에 기반한 분산 시스템을 만들기 위한 아키텍쳐 스타일. 고로 HTTP에 꼭 연관 되어 있지 않아도 됨. 하지만 대부분 REST API는 HTTP pro..
CustomErrorController 만들기 https://www.baeldung.com/spring-boot-custom-error-page
StringUtils https://hahaha2016.tistory.com/5 StringUtils(Trim, Truncate) -문자열 처리 클래스 - org.apache.commons.lang3.StringUtils ==================== Trim * StringUtils.trim(String str) - 문자열 앞 뒤에 공백을 제거해준다. - str이 null이면 null 값을 반환한다. StringUtils.trim(null) = nu.. hahaha2016.tistory.com https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html StringUtils (Apache Commons L..
@PathVariable vs @RequestParam 면접 때 나온 질문이다. @PathVariable은 URI 경로부터 값을 추출하고, @RequestParam은 query string으로부터 값을 추출한다. @PathVariable은 URI path 값을 encode 되지 않은채 그대로 추출함. 예) http://localhost:8080/spring-mvc-basics/foos/ab+c ---- ID: ab+c @RequestParam은 파리미터 값이 decode 되어 됨. 예) http://localhost:8080/spring-mvc-basics/foos?id=ab+c ---- ID: ab c @PathVariable 및 @RequestParam 둘 다 Optional 기능이 있음. URI Path 혹은 query string 값을 required..
[Java] Abstract vs Interface 추상 클래스 필드와 메서드 제어자에 제한이 없음. 정의 추상메서드를 1개 이상 포함하고 있는 클래스는 반드시 추상 클래스로 정의 추상 메서드 메서드 기능이 정의 되어 있지 않은 미완성 메서드 (중괄호가 없는 메서드)가 1개 이상 있다는 뜻. 앞에 abstract를 붙임. 예시 abstract class A { abstract void abc(); // 중괄호 없이 명령어의 끝을 알리는 세미콜론(;)으로 끝나야 함. }특징 추상 클래스는 내부의 미완성 메서드 때문에 객체를 직접 생성할 수 없다. 이유: 힙 메모리에 생성되는 객체는 내부 요소가 미완성된 상태로 들어갈 수 없기 때문이다. 예시) A a = new A() 할 수 없음. 추상 클래스를 상속하는 자식 클래스는 부모에게 상속받은 미완성 메서드(추상 ..
객체지향 프로그래밍 객체지향 프로그래밍 - "프로그램에서 사용되는 객체를 생성하고, 각 객체에 포함된 데이터와 기능을 상호 호출함으로써 프로그램을 구성하는 방식." 출처: Do it! 자바 완전 정복 - 클래스와 객체의 개념에 의존하는 프로그래밍 패러다임 - 프로그램을 간단하고 재사용 가능한 코드 (클래스)로 구성하기 위해 사용되는 패러다임. 출처: https://www.educative.io/blog/object-oriented-programming What is object-oriented programming? OOP explained in depth Learn what is OOP, the building blocks of an OOP program, the four principles that make up OOP..
클래스, 객체, 인스턴스 변수 "다양한 형태의 데이터를 저장하기 위해 각각의 데이터를 저장할 수 있는 변수" 배열 같은 자료형의 변수들을 묶어서 1개의 새로운 자료형의 관리. 구조체: "서로 다른 자료형을 1개의 자료형으로 묶어서 관리할 수 있는 타입." 클래스 - "객체를 만들기 위한 설계도" - "다양한 자료형의 데이터를 묶어서 관리 + 데이터를 처리하는 다양한 기능 (메서드) 포함" 객체 - "사용할 수 있는 실체" 인스턴스 - "클래스의 생성자로 객체를 만드는 과정을 '인스턴스화'", "인스턴스화로 만들어진 객체를 "인스턴스"라고 함. 출처: Do it! 자바 완전 정복
Found 2 pods, using pod/my-springboot-dm-794f6cc79c-dj9htError from server (BadRequest): container "my-springboot-app" in pod "my-springboot-dm-794f6cc79c-dj9ht" is waiting to start: image can't be pulled Kubernetes에 이전 pod를 삭제하고, 새 이미지를 푸쉬한 후 다시 pod를 생성하려니 다음과 같은 에러가 떴다. Found 2 pods, using pod/my-springboot-dm-794f6cc79c-dj9ht Error from server (BadRequest): container "my-springboot-app" in pod "my-springboot-dm-794f6cc79c-dj9ht" is waiting to start: image can't be pulled imagePullPolicy: Never 문구를 다음과 같은 위치에 추가해주니 되었다. apiVersion: v1 kind: Pod metadata: name: local-image-test spec: containers:..
Error saving credentials: error storing credentials - err: exit status 1, out: 로컬에서 AWS ECR 로그인을 하려는데 다음과 같은 에러가 떴다. Error saving credentials: error storing credentials - err: exit status 1, out: sudo vi ~/.docker/config.json 명령어를 친 다음 "credsStore": "osxkeychain" 이렇게 바꿔준다. 그리고 :wq 엔터. 그러면 로그인이 될 것이다. 출처: https://stackoverflow.com/questions/64455468/error-when-logging-into-ecr-with-docker-login-error-saving-credentials-not Error when logging into ECR with Docker login: "Err..
로컬에 저장된 AWS 시크릿키 찾기 터미널에서 cat ~/.aws/credentials 치기.