문제 원격 저장소를 추가하는 도중 "fatal: remote origin already exists." 메세지가 나온다. 이미 다른 원격 저장소가 연결되었던 프로젝트이다. git remote add origin [원격 서버 주소] fatal: remote origin already exists. 해결 "git remote rm [원격 저장소 이름]" 명령으로 원격 저장소를 삭제한 다음 다시 원격 저장소를 추가한다. git remote rm origin git remote add origin [원격 서버 주소] 참고 blog.naver.com/PostView.nhn?blogId=angelkim88&logNo=221565694228&parentCategoryNo=&categoryNo=51&viewDate=&..
GC(Garbage Collector)란? - JVM의 Heap 영역에서 사용하지 않는 객체를 삭제하는 프로세스 GC의 수거 대상 - 어떤 객체의 유효한 참조가 존재한다면 Reachable, 그렇지 않다면 Unreachable이라고 한다. GC의 동작 순서 - Mark and Sweep 알고리즘을 따른다. - Mark는 Reachable 객체와 Unreachable 객체를 식별하여 마킹한다. - Sweep은 Unreachable한 객체들을 Heap에서 제거한다. - GC 알고리즘에 따라 Compact 과정이 추가되기도 한다. Compact는 Sweep 후에 분산된 객체들을 한 곳으로 모아서 메모리 단편화를 막아준다. GC는 언제 일어날까 - Heap의 구조는 Young Generation, Old Gen..
Java Virtual Machine이란? - Java로 개발한 프로그램을 컴파일하여 만들어지는 바이트코드를 실행시키기 위한 가상머신. - JRE(Java Runtime Environment)에 포함되어 있다. - Class Loader, Runtime Data Area, Execution Engine, JNI, Native Method Library으로 이루어져 있다. Class Loader - .class 파일을 JVM의 Runtime Data Area에 배치한다. Runtime Data Area - Method 영역, Heap 영역은 모든 쓰레드가 공유하는 영역. - Stacks, PC registers, Native Method Stacks은 쓰레드 마다 하나씩 생성되는 공간. - Method 영..
1. 시스템 업데이트 sudo apt update && sudo apt-get -y upgrade 2. MariaDB 설치 sudo apt-get install -y mariadb-server 3. 기본 설정 root 계정 비밀번호 설정 및 권한 부여 sudo mysql use mysql update user set plugin='' where User='root'; set password = password('YOUR PASSWORD'); flush privileges; 접속확인 mysql -u root -p 4. DB에서 사용하는 문자열 점검 SHOW VARIABLES LIKE 'char%'; utf8mb4로 기본 설정되어 있지만 만약 아니라면 utf8mb4로 변경한다. 참고 : jm4488.tist..
1. puttygen 다운로드 www.puttygen.com/ PuTTYgen Download Download PuTTYgen for Windows, Linux and Mac operating system. Find step by step guide to downloading PuTTYgen, a key generator for free. www.puttygen.com 2. RSA key 생성 Generate 버튼을 눌러서 key를 생성한다. 마우스 커서를 움직이면 바가 차오르는데 다 차오를때까지 움직여준다. Key comment에 Username을 입력하고 Save public key, Save private key(.ppk 확장자) 버튼을 각각 눌러서 각각 저장한다. Save private key를 ..
구글 클라우드 방화벽 설정 메뉴 -> VPC 네트워크 -> 방화벽 -> 방화벽 규칙 만들기 소스 IP 범위 방화벽에서 허용하는 IP의 범위 예: 0.0.0.0/0 - 모든 IP 허용, 192.168.2.0/24 - 192.168.2.0 ~ 192.168.2.255까지 허용 CIDR(Classless Inter-Domain Routing: 클래스 없는 도메인 간 라우팅 기법) 표기법 - IP 주소는 0.0.0.0 ~ 255.255.255.255 범위의 주소를 가질 수 있다. - IP 주소의 각 숫자는 '.'으로 구분하고 숫자 한개가 1 Octet(=1 Byte)이다. - 1 Octet 값을 2진수로 표현하면 0과 1로 8자리로 표현할 수 있다. 예) 11111111.11111111.00000000.0000..
퍼사드 패턴(Facade Pattern) 하나의 인터페이스에서 복잡한 서브시스템을 통합하여 동작시킬 수 있도록 제공해주는 패턴 퍼사드 객체가 클래스 라이브러리 같은 어떤 소프트웨어의 다른 커다란 코드 부분에 대한 간략화된 인터페이스를 제공한다. 실제 사용 예 : Spring에서 Controller 구조 예제 소스 코드 /* Complex parts */ class CPU { public void freeze() { ... } public void jump(long position) { ... } public void execute() { ... } } class Memory { public void load(long position, byte[] data) { ... } } class HardDrive ..
응답 상태 코드 그룹 1. 정보를 제공하는 응답 2. 성공적인 응답 3. 리다이렉트 4. 클라이언트 에러 5. 서버 에러 응답 상태 코드 상태코드 의미 설명 100 Continue 지금까지의 상태가 괜찮으며 클라이언트가 계속해서 요청을 하거나 이미 요청을 완료한 경우에는 무시해도 되는 것을 알려준다. 200 OK 요청이 성공적으로 되었다. 400 Bad Request 잘못된 문법으로 인하여 서버가 요청을 이해할 수 없음. 403 Forbidden 클라이언트는 콘텐츠에 접근할 권리를 가지고 있지 않다. 404 Not Found 서버는 요청받은 리소스를 찾을 수 없다. 500 Internal Server Error 서버가 처리 방법을 모르는 경우 발생. 503 Service Unavailable 서버가 요청..
REST(=RESTful) API(Representational State Transfer Application Programming Interface) REST 구조의 제약 조건을 준수하는 API를 뜻함 웹의 장점을 최대한 활용할 수 있는 구조 REST 구성 자원(Resource) - URI 행위(Verb) - HTTP METHOD 표현(Representations) REST 특징 1. Uniform Interface(통일된 방식) : URI로 지정된 리소스에 대한 조작을 통일된 방식으로 수행하는 구조 2. Stateless(무상태성) : API 서버는 들어오는 요청만 단순히 처리한다. 3. Cacheable(캐시 가능) : HTTP 프로토콜 표준에서 사용하는 Last-Modified Tag나 E-Ta..