전체 글
-
Spring Security와 Oauth 2.0으로 로그인 구현하기(SpringBoot + React)프로젝트/WebRTC 화상통화 프로젝트 2022. 7. 19. 02:55
(1) OAuth2.0이란? (2) Spring Security와 OAuth 2.0으로 로그인 구현하기(SpringBoot + React) (3) Spring Security OAuth 2.0 단위테스트 (4) Spring Security가 OAuth 로그인을 처리하는 방법 (5) Sign In with Apple REST API 문서 정리 (6) Rest API로 Apple 로그인 구현 이해하는데 도움이 되는 개념들 Spring Boot Oauth 2.0 Flow에 대한 이해 인증/인가에 대한 이해 간단한 JPA 지식 다음과 같은 내용을 다루고 있습니다. 이 방식은 REST API 통신으로는 적절하지 않습니다(HTTP Status 등으로 통신하지 않고 redirect를 통하여 데이터를 주고받습니다) S..
-
책임 연쇄 패턴이란?Java 2022. 7. 19. 00:01
책임 연쇄 패턴(Chain of responsibility)이란? 책임이란? 클래스 단위로 무언가를 처리하는 기능 연쇄란? 여러 개의 책임들을 동적으로 연결해서 순차적으로 실행함 책임 연쇄란? 즉, 기능을 클래스 별로 분리한 후 각 기능(클래스)을 동적으로 연결하여 순차적으로 실행합니다. 다음은 책임 연쇄 패턴의 예시입니다. 여러개의 클래스들이 클라이언트의 요청을 처리하기 위해 객체를 체인 형태로 전달하여 결합력을 낮춥니다. 등장배경 이해를 하기 쉽게 여러가지 방법을 사용해 결제하는 상황을 연출하여 보겠습니다. 만약 결제를 할 때 다음과 같은 수단으로 결제할 수 있다고 가정하겠습니다. - 현금(Cash)으로 결제할 수 있다. - 신용카드(Credit Card)로 결제할 수 있다. 간단하게 코드를 작성하여..
-
Merge 와 Rebase란?Git 2022. 7. 18. 00:01
Merge란? git merge 위의 명령어는 다른 브랜치를 현재 Checkout 된 브랜치에 Merge 하는 명령어입니다. Merge 하고 나서 현재 브랜치가 Merge 된 결과를 가리키도록 옮깁니다. Rebase란? git rebase 위의 명령어도 마찬가지로 브랜치를 합치는 명령어입니다. Merge와 Rebase의 실행결과는 같지만 커밋 히스토리가 달라집니다. Rebase의 의미인 base를 새롭게 설정한다는 의미입니다. 초보자가 거리를 둬야 하는 명령어입니다. Merge와 Rebase 비교 Merge부터 살펴보겠습니다. A개발자가 Feature 브랜치를 만들고 새로운 기능을 만들기 위해 열심히 작업을 하고 있습니다. 이 와중에 main 브랜치에는 다른 팀원들이 새 커밋으로 업데이트가 되고 있습니다..
-
ERD 설계하기프로젝트/WebRTC 화상통화 프로젝트 2022. 7. 17. 20:43
회원과 그룹은 N:M 관계입니다.(회원은 여러 그룹을 가질 수 있고 그룹은 여러 회원을 가질 수 있습니다.) (중간 테이블을 활용하여 1:N, M:1로 풀어냈습니다.) 회원과 회원 아이콘은 1:N 관계입니다. (회원은 여러 개의 아이콘을 가질 수 있습니다) 그룹과 그룹아이콘은 1:N 관계입니다. (그룹은 여러 개의 아이콘을 가질 수 있습니다) 그룹과 운동 루틴은 1:N관계입니다. (그룹은 여러 개의 운동 루틴을 가질 수 있습니다) 운동 루틴과 룸은 1 : 1 관계입니다. ( 룸은 하나의 운동 루틴을 가지고 있습니다) 루틴과 루틴 디테일은 1 : N 관계입니다. (루틴은 여러 개의 운동 디테일을 가질 수 있습니다) 그룹과 룸은 1:1 관계입니다. (그룹은 한개의 룸을 가질 수 있습니다) 룸과 룸에 참여자는..
-
ARP 프로토콜이란?CS/네트워크 2022. 7. 17. 00:01
ARP 프로토콜이란? 같은 네트워크 대역에서 통신을 하기 위한 필요한 MAC 주소를 IP주소를 이용하여 알아오는 프로토콜입니다. 보통 우리가 www.google.com을 검색하게 되면 해당 도메인 주소가 DNS 서버에 의해 IP주소로 변환됩니다. 즉, 우리는 IP주소만 알고 있으며 MAC 주소는 알지 못합니다. 하지만 데이터를 보내기 위해서는 계층별로 캡슐화가 필요하며 이때 IP주소와 MAC 주소가 모두 필요하게 됩니다. 이때 ARP를 통해 MAC주소를 알게 됩니다. 2계층과 3계층 사이에서 동작하는 프로토콜입니다. ARP 프로토콜이 필요한 이유는? 왜 IP -> MAC 주소의 절차를 거쳐서 통신해야 할까요? IP를 활용하면 메시지를 보내고자 하는 PC의 네트워크까지만 접근할 수 있습니다. 또한 IP주소..
-
프로젝트 생성하기(Spring Boot + MySQL + Spring Data JPA)프로젝트/WebRTC 화상통화 프로젝트 2022. 7. 16. 14:17
1. Spinrg initializr를 통해서 프로젝트를 생성하기. https://start.spring.io/ Proejct : Gradle Project Language : Java Packaging : Jar(REST API server로 만들기 때문에 JSP필요 x) - Spring 문서에서도 JSP를 피하라고 명시 Java : 11 Dependencies : Lombok, Spring Web, Spring Data JPA, MySQL Driver 하단의 GENERATE를 눌러줍니다. 이후 원하는 경로에 압축을 풀어서 폴더의 위치를 기억합니다. (개인적으로 C:\inteliij 폴더 안에 넣었습니다) 2. Intellij를 실행하고 Project Open 2-1 File -> Open 2-2 프로..
-
MySQL workbench 계정 추가하기CS/데이터베이스 2022. 7. 16. 12:32
1. root 계정으로 접속 2. Navigator -> Administration -> Users and Privileges -> Add Account -> Login 정보 작성 3. Administrative Roles -> 모든 권한을 다 체크 -> Apply 4. MySQL Connections를 추가합니다. Setup New Connection에 등록했던 값을 입력합니다. store in Valut... 를 클릭하고 비밀번호를 입력합니다. Test Connection 버튼을 눌러서 성공 창이 뜨는지 확인합니다. 계정이 성공적으로 생성되었습니다. 출처 https://moo-you.tistory.com/211 MySQL 워크벤치 계정추가하기 지난 포스팅에서 MySQL utf8 설정까지 했습니다. h..
-
[백준] 9466번 : 텀 프로젝트 - 자바(JAVA)알고리즘/백준 2022. 7. 16. 00:01
https://www.acmicpc.net/problem/9466 9466번: 텀 프로젝트 이번 가을학기에 '문제 해결' 강의를 신청한 학생들은 텀 프로젝트를 수행해야 한다. 프로젝트 팀원 수에는 제한이 없다. 심지어 모든 학생들이 동일한 팀의 팀원인 경우와 같이 한 팀만 있을 www.acmicpc.net 문제 해석 프로젝트 팀원 수에는 제한이 없습니다. 모든 학생들은 프로젝트를 함께하고 싶은 학생을 선택해야 합니다. 혼자 하고 싶어 한다면 자기 자신을 선택하는 것도 가능합니다. 예시로 한반에 7명의 학생들이 존재하고 학생들을 1번부터 7번으로 표현할 때 선택의 결과는 다음과 같습니다. 1 2 3 4 5 6 7 3 1 3 7 3 4 6 위의 결과를 통해 (3)과 (4 7 6)은 팀을 이룰 수 있지만 1,..