-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refactor] Refactor 진행중 - Comment DB에 user 데이터 추가해야함.
- Loading branch information
Showing
44 changed files
with
360 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,63 @@ | ||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ "123" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
AWS_REGION: ap-northeast-2 | ||
S3_BUCKET_NAME: dowajoyak.store | ||
CODE_DEPLOY_APPLICATION_NAME: dowajoyak-CodeDeploy | ||
CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: dowajoyak-CodeDeploy-group | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
working-directory: ./server | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Add permission | ||
run: chmod +x gradlew | ||
working-directory: ${{ env.working-directory }} | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build | ||
working-directory: ${{ env.working-directory }} | ||
|
||
|
||
# build한 후 프로젝트를 압축합니다. | ||
- name: Make zip file | ||
run: zip -r ./seb-main-project-009.zip . | ||
shell: bash | ||
|
||
# Access Key와 Secret Access Key를 통해 권한을 확인합니다. | ||
# 아래 코드에 Access Key와 Secret Key를 직접 작성하지 않습니다. | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} # 등록한 Github Secret이 자동으로 불려옵니다. | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # 등록한 Github Secret이 자동으로 불려옵니다. | ||
aws-region: ap-northeast-2 | ||
|
||
# 압축한 프로젝트를 S3로 전송합니다. | ||
- name: Upload to AWS S3 | ||
run: aws s3 cp --region ap-northeast-2 ./seb-main-project-009.zip s3://$S3_BUCKET_NAME/seb-main-project-009.zip | ||
# CodeDeploy에게 배포 명령을 내립니다. | ||
- name: Code Deploy | ||
run: > | ||
aws deploy create-deployment --application-name $CODE_DEPLOY_APPLICATION_NAME | ||
--deployment-config-name CodeDeployDefault.AllAtOnce | ||
--deployment-group-name $CODE_DEPLOY_DEPLOYMENT_GROUP_NAME | ||
--s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=seb-main-project-009.zip | ||
# | ||
#name: Java CI with Gradle | ||
# | ||
#on: | ||
# push: | ||
# branches: [ "123" ] | ||
# | ||
#permissions: | ||
# contents: read | ||
# | ||
#env: | ||
# AWS_REGION: ap-northeast-2 | ||
# S3_BUCKET_NAME: dowajoyak.store | ||
# CODE_DEPLOY_APPLICATION_NAME: dowajoyak-CodeDeploy | ||
# CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: dowajoyak-CodeDeploy-group | ||
# | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# working-directory: ./server | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up JDK 11 | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# java-version: '11' | ||
# distribution: 'temurin' | ||
# | ||
# - name: Add permission | ||
# run: chmod +x gradlew | ||
# working-directory: ${{ env.working-directory }} | ||
# | ||
# - name: Build with Gradle | ||
# run: ./gradlew clean build | ||
# working-directory: ${{ env.working-directory }} | ||
# | ||
# | ||
# # build한 후 프로젝트를 압축합니다. | ||
# - name: Make zip file | ||
# run: zip -r ./seb-main-project-009.zip . | ||
# shell: bash | ||
# | ||
# # Access Key와 Secret Access Key를 통해 권한을 확인합니다. | ||
# # 아래 코드에 Access Key와 Secret Key를 직접 작성하지 않습니다. | ||
# - name: Configure AWS credentials | ||
# uses: aws-actions/configure-aws-credentials@v1 | ||
# with: | ||
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} # 등록한 Github Secret이 자동으로 불려옵니다. | ||
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # 등록한 Github Secret이 자동으로 불려옵니다. | ||
# aws-region: ap-northeast-2 | ||
# | ||
# # 압축한 프로젝트를 S3로 전송합니다. | ||
# - name: Upload to AWS S3 | ||
# run: aws s3 cp --region ap-northeast-2 ./seb-main-project-009.zip s3://$S3_BUCKET_NAME/seb-main-project-009.zip | ||
# # CodeDeploy에게 배포 명령을 내립니다. | ||
# - name: Code Deploy | ||
# run: > | ||
# aws deploy create-deployment --application-name $CODE_DEPLOY_APPLICATION_NAME | ||
# --deployment-config-name CodeDeployDefault.AllAtOnce | ||
# --deployment-group-name $CODE_DEPLOY_DEPLOYMENT_GROUP_NAME | ||
# --s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=seb-main-project-009.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ain/java/com/codestates/sebmainproject009/comment/repository/CommentCustomRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.codestates.sebmainproject009.comment.repository; | ||
|
||
import com.codestates.sebmainproject009.comment.entity.Comment; | ||
|
||
|
||
public interface CommentCustomRepository { | ||
Comment findByCommentId(String id); | ||
|
||
void deleteByCommentId(String id); | ||
|
||
} |
5 changes: 2 additions & 3 deletions
5
.../src/main/java/com/codestates/sebmainproject009/comment/repository/CommentRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
package com.codestates.sebmainproject009.comment.repository; | ||
|
||
import com.codestates.sebmainproject009.comment.entity.Comment; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.mongodb.repository.MongoRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface CommentRepository extends JpaRepository<Comment, Long> { | ||
public interface CommentRepository extends MongoRepository<Comment, String>, CommentCustomRepository{ | ||
} |
Oops, something went wrong.