Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b793ffb
Sprint 6 과제 제출
Eunhye0k Jul 28, 2025
dc3f14a
Sprint6 과제 제출
Eunhye0k Jul 28, 2025
4ad150b
Sprint7 과제 제출
Eunhye0k Aug 18, 2025
c21338e
Sprint7 과제 제출
Eunhye0k Aug 18, 2025
1ad19d8
sprint8 base 코드
Eunhye0k Aug 22, 2025
c938df0
에러 코드 수정 및 Dockerfile 작성
Eunhye0k Aug 22, 2025
f552d65
application.yaml, docker-compose 구현
Eunhye0k Aug 25, 2025
a36b46e
AWSS3Test 성공 테스트작성 완료
Eunhye0k Aug 25, 2025
b2039b8
S3BinaryContentStorage 구현
Eunhye0k Aug 25, 2025
fd1b619
S3BinaryContentStorage 나머지 기능 구현, application.yml 수정
Eunhye0k Aug 26, 2025
29e4559
test 코드 작성 완료
Eunhye0k Aug 27, 2025
1289b94
gitignore 수정
Eunhye0k Aug 28, 2025
d2cebcc
sprint 9 세팅
Eunhye0k Sep 26, 2025
9587b45
Merge branch 'sprint9' of https://github.com/Eunhye0k/4-sprint-missio…
Eunhye0k Sep 26, 2025
f4e5980
feat(Security 관리): CSRF 보호 기본 설정
Eunhye0k Sep 26, 2025
a8a46a8
feat(Security 관리): CSRF 토큰 발급 API 구현
Eunhye0k Sep 26, 2025
08c0fc7
feat(Security 관리): Password를 해시처리해서 Bcrypt로 저장
Eunhye0k Sep 29, 2025
a31fc7a
feat(Security 관리): UserDetails, UserDetailsService, LoginSuccessHandl…
Eunhye0k Sep 30, 2025
b139a18
feat(Security 관리): LoginFailureHandler 구현
Eunhye0k Sep 30, 2025
b3167d7
feat(Security 관리): 로그인 안되는 문제 해결, 회원가입 페이지 권한 부여 완료, 로그아웃까지 구현
Eunhye0k Oct 1, 2025
a07efb0
feat(Security 관리): 인증 - 로그아웃 완료. 인가 - 권한 정의까지 완료
Eunhye0k Oct 1, 2025
a744e2c
feat(Security 관리): 인가 - 메서드 권한 부여
Eunhye0k Oct 1, 2025
bde9f08
feat(Security 관리): test.yml 파일에 권한 부여
Eunhye0k Oct 1, 2025
eae627a
feat(Security 관리): 심화 기능 구현 완료
Eunhye0k Oct 2, 2025
083c831
feat(Security 관리): 심화 기능 구현 완료
Eunhye0k Oct 2, 2025
a613d8c
Merge remote-tracking branch 'upstream/강은혁' into sprint9
Eunhye0k Oct 2, 2025
a621417
Merge remote-tracking branch 'upstream/강은혁' into sprint9
Eunhye0k Oct 2, 2025
004b49a
sprint10 세팅
Eunhye0k Oct 15, 2025
dd01470
jwt 토큰 구현
Eunhye0k Oct 21, 2025
f898c4b
Merge remote-tracking branch 'origin/sprint10' into sprint10
Eunhye0k Oct 21, 2025
7ad802c
브랜치 충돌 해결
Eunhye0k Oct 28, 2025
295167c
오류수정
Eunhye0k Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: 배포

on:
push:
branches:
- release

jobs:
build-and-push:
runs-on: ubuntu-latest
outputs:
image_tag: ${{ github.sha }}

steps:
- uses: actions/checkout@v4

- name: AWS CLI 설정
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: us-east-1

- name: ECR 로그인
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Docker 이미지 빌드 및 푸시
run: |
docker buildx build \
-t ${{ vars.ECR_REPOSITORY_URI }}:${{ github.sha }} \
-t ${{ vars.ECR_REPOSITORY_URI }}:latest \
--push \
.
deploy:
runs-on: ubuntu-latest
needs: build-and-push

steps:
- name: AWS CLI 설정
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ vars.AWS_REGION }}

- name: ECS 태스크 정의 업데이트
run: |
TASK_DEFINITION=$(
aws ecs describe-task-definition \
--task-definition ${{ vars.ECS_TASK_DEFINITION }}
)

NEW_TASK_DEFINITION=$(
echo $TASK_DEFINITION | jq \
--arg IMAGE "${{ vars.ECR_REPOSITORY_URI }}:latest" \
'.taskDefinition | .containerDefinitions[0].image = $IMAGE | del(.taskDefinitionArn, .revision, .status, .requiresAttributes, .compatibilities, .registeredAt, .registeredBy)'
)

# 새로운 태스크 정의 등록
NEW_TASK_DEF_ARN=$(
aws ecs register-task-definition \
--cli-input-json "$NEW_TASK_DEFINITION" | \
jq -r '.taskDefinition.taskDefinitionArn'
)

# 환경 파일에 변수 저장 (다음 단계에서 사용 가능)
echo "NEW_TASK_DEF_ARN=$NEW_TASK_DEF_ARN" >> $GITHUB_ENV

- name: ECS 서비스 중지(프리티어 환경 고려)
run: |
aws ecs update-service \
--cluster ${{ vars.ECS_CLUSTER }} \
--service ${{ vars.ECS_SERVICE }} \
--desired-count 0

- name: ECS 서비스 업데이트
run: |
aws ecs update-service \
--cluster ${{ vars.ECS_CLUSTER }} \
--service ${{ vars.ECS_SERVICE }} \
--task-definition $NEW_TASK_DEF_ARN \
--desired-count 1 \
--force-new-deployment

30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 테스트

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: 체크아웃
uses: actions/checkout@v4

- name: JDK 17 설정
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
cache: gradle

- name: 테스트 실행
run: ./gradlew test

- name: Codecov 테스트 커버리지 업로드
uses: codecov/codecov-action@v3
with:
files: build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.CODECOV_TOKEN }} # 퍼블릭 저장소라면 생략 가능
35 changes: 24 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
Expand All @@ -17,15 +25,6 @@ bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
Expand All @@ -35,3 +34,17 @@ out/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

### Discodeit ###
.discodeit

### 숨김 파일 ###
.*
!.gitignore


### Github Actions ###
!.github/
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 빌드 스테이지
FROM amazoncorretto:17 AS builder

# 작업 디렉토리 설정
WORKDIR /app

# Gradle Wrapper 파일 먼저 복사
COPY gradle ./gradle
COPY gradlew ./gradlew

# Gradle 캐시를 위한 의존성 파일 복사
COPY build.gradle settings.gradle ./

# 의존성 다운로드
RUN ./gradlew dependencies

# 소스 코드 복사 및 빌드
COPY src ./src
RUN ./gradlew build -x test


# 런타임 스테이지
FROM amazoncorretto:17-alpine3.21

# 작업 디렉토리 설정
WORKDIR /app

# 프로젝트 정보를 ENV로 설정
ENV PROJECT_NAME=discodeit \
PROJECT_VERSION=1.2-M8 \
JVM_OPTS=""

# 빌드 스테이지에서 jar 파일만 복사
COPY --from=builder /app/build/libs/${PROJECT_NAME}-${PROJECT_VERSION}.jar ./

# 80 포트 노출
EXPOSE 80

# jar 파일 실행
ENTRYPOINT ["sh", "-c", "java ${JVM_OPTS} -jar ${PROJECT_NAME}-${PROJECT_VERSION}.jar"]
22 changes: 22 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.4.0/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.4.0/gradle-plugin/packaging-oci-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/3.4.0/reference/web/servlet.html)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)

### Additional Links
These additional references should also help you:

* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)

Binary file removed Message.ser
Binary file not shown.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# 0-spring-mission

스프린트 미션 모범 답안 리포지토리입니다.

[![codecov](https://codecov.io/gh/codeit-bootcamp-spring/0-sprint-mission/branch/s8%2Fadvanced/graph/badge.svg?token=XRIA1GENAM)](https://codecov.io/gh/codeit-bootcamp-spring/0-sprint-mission)
Loading