코드 컨벤션 - [우아한테크코스/프리코스] Java Code Conventions : https://programmer-ririhan.tistory.com/337
- RESTful API : https://sanghaklee.tistory.com/57
프로젝트시 자주 묻는 질문 목록 : https://programmer-ririhan.tistory.com/337
Pre-Project에서는 우리 팀만의 스택오버플로우를 제작한다.
앞으로 학습할 산출물을 작성하며 프로젝트의 초안을 기획하고 Unit3 학습 이후 스택오버플로우를 구현한다.
IDE: IntelliJ(Ultimate)
JDK: OpenJDK - Zulu11
Framework - Spring Boot 2.7.1
Build Tool - Gradle
VCS - Git / Github
Packaging - Jar
DB - MySQL / H2(Testing)
AWS - EC2 / RDS
Dependencies
- Spring Web
- Lombok
- Mysql Connector
- H2 Connector
- Spring Security
- Spring Data JPA
- Validation
Table user {
user_id long [primary key]
username varchar
user_password varchar
created_at timestamp
}
Table question {
question_id long [primary key]
title varchar
body text [note: 'Content of the post']
user_id long
created_at timestamp
modified_at timestamp
}
Table answer {
answer_id long [primary key]
body text [note: 'Content of the post']
user_id integer
question_id long
created_at timestamp
modified_at timestamp
}
Table vote {
vote_id long [primary key]
user_id integer
question_id long
answer_id long
amount integer
}
Table comment {
comment_id long [primary key]
user_id integer
question_id long
answer_id long
body text [note: 'Content of the post']
created_at timestamp
modified_at timestamp
}
Table tag {
tag_id long [primary key]
question_id long
tag_name varchar
}
Ref: question.user_id > user.user_id // many-to-one
Ref: answer.user_id > user.user_id // many-to-one
Ref: answer.question_id > question.question_id // many-to-one
Ref: vote.user_id > user.user_id // many-to-one
Ref: vote.question_id > question.question_id // many-to-one
Ref: vote.answer_id > answer.answer_id // many-to-one
Ref: comment.user_id > user.user_id // many-to-one
Ref: comment.question_id > question.question_id // many-to-one
Ref: comment.answer_id > answer.answer_id // many-to-one
Ref: tag.question_id > question.question_id // many-to-one
API 명세서 : https://documenter.getpostman.com/view/15713384/2s9Xxzut34
Postman API 문서 작성 참고자료 :
- 캐시를 지우고, EC2에 설치되어있던 MYSQL을 RDS로 옮김
- 남은 용량 보는 법 :
free -h
sudo docker rm -f server
: server라는 이름의 컨테이너 삭제
sudo docker run -d --name server -p 8080:8080 7eleven-cicd
: 도커 실행
sudo vi /etc/environment
source /etc/environment
sudo vi/etc/profile
- 우분투 내부 환경변수 편집 (docker 컨테이너 내부에서 실행할 때 소용없음!)
sudo source/etc/profile
sudo docker image prune
free -h
- Github Secrets -> workflow 파일 -> Dockerfile에 전달되도록해서 구동하도록