-
Notifications
You must be signed in to change notification settings - Fork 1
[REFACTOR] #190: 프로젝트 구조 변경 #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b29baf7
[FIX] 스터디 신청 시 파일 관련 예외 처리 추가 및 구글 로그인 인가 오류 수정
kaswhy 1171df3
[FIX] 토큰 불일치 로그 추가
kaswhy 82860ec
[FIX] 토큰 재발급 시 로그 추가
kaswhy 814a78e
[FIX] 토큰 재발급 시 로그인 타입을 enum으로 저장
kaswhy 549a9b1
[FIX] 구글 로그인 시 쿠키 도메인을 프론트 도메인으로 설정
kaswhy 168b8eb
[FIX] 스터디 상세 조회 시 imagePath 주는 오류 수정
kaswhy bb1c1d5
[FEAT] CI 추가 및 RDS 변경
kaswhy 03c5b92
[FEAT] #70: prod, dev 환경 분리
kaswhy 650f1df
refactor(#190/*): 프로젝트 구조 변경
kaswhy aa2d888
refactor(#190/*): dockerignore에 .env 추가
kaswhy dab9cb9
refactor(#190/*): .gitignore 경로 오류 수정
kaswhy 6cbb165
refactor(#190/*): .gitignore에서 .env 패턴이 다단계 하위 디렉터리/변형명 포괄하도록 수정
kaswhy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,9 @@ | ||
| .git | ||
| .gradle | ||
| build | ||
| *.log | ||
| .DS_Store | ||
| .env | ||
| *.env | ||
| **/*.env | ||
| deploy-*.zip | ||
File renamed without changes.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,16 +1,27 @@ | ||
| FROM gradle:8.0.2-jdk17 AS build | ||
| WORKDIR /app/gdgoc | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| COPY gdgoc/ . | ||
| RUN ls -l | ||
| RUN chmod +x gradlew | ||
| RUN ./gradlew build -x test | ||
| # --- Build stage --- | ||
| FROM gradle:8.11.1-jdk17 AS build | ||
| WORKDIR /app | ||
|
|
||
| # 루트 프로젝트 전체 복사 | ||
| COPY . . | ||
|
|
||
| # wrapper가 있다면 wrapper 사용 권장 | ||
| # 권한 부여는 로컬에서 이미 되어 있을 수도 있음 | ||
| RUN chmod +x ./gradlew || true | ||
|
|
||
| # 테스트는 컨테이너 빌드에서 보통 스킵 (CI에서 이미 수행) | ||
| RUN ./gradlew clean bootJar -x test --no-daemon | ||
|
|
||
| RUN cp $(ls /app/gdgoc/build/libs/*.jar | head -n 1) /app/gdgoc/build/libs/app.jar | ||
| # 산출물 이름이 가변적이면 가장 최신 jar를 app.jar로 복사 | ||
| RUN cp "$(ls build/libs/*.jar | head -n 1)" build/libs/app.jar | ||
|
|
||
| FROM openjdk:17-jdk-slim | ||
| # --- Runtime stage --- | ||
| FROM eclipse-temurin:17-jre | ||
| WORKDIR /app | ||
|
|
||
| COPY --from=build /app/gdgoc/build/libs/app.jar app.jar | ||
| COPY --from=build /app/build/libs/app.jar app.jar | ||
|
|
||
| ENTRYPOINT ["java", "-jar", "app.jar"] | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["java","-jar","/app/app.jar"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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 @@ | ||
| rootProject.name = '24-2_GDGoC_Server' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
72 changes: 72 additions & 0 deletions
72
src/test/java/inha/gdgoc/domain/recruit/service/RecruitMemberServiceTest.java
This file contains hidden or 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,72 @@ | ||
| package inha.gdgoc.domain.recruit.service; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
| import static org.mockito.Mockito.*; | ||
|
|
||
| import com.fasterxml.jackson.databind.ObjectMapper; | ||
| import inha.gdgoc.domain.recruit.dto.request.ApplicationRequest; | ||
| import inha.gdgoc.domain.recruit.dto.request.RecruitMemberRequest; | ||
| import inha.gdgoc.domain.recruit.entity.RecruitMember; | ||
| import inha.gdgoc.domain.recruit.enums.EnrolledClassification; | ||
| import inha.gdgoc.domain.recruit.enums.Gender; | ||
| import inha.gdgoc.domain.recruit.repository.AnswerRepository; | ||
| import inha.gdgoc.domain.recruit.repository.RecruitMemberRepository; | ||
| import java.time.LocalDate; | ||
| import org.junit.jupiter.api.Test; | ||
| import org.junit.jupiter.api.extension.ExtendWith; | ||
| import org.mockito.InjectMocks; | ||
| import org.mockito.Mock; | ||
| import org.mockito.junit.jupiter.MockitoExtension; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| class RecruitMemberServiceTest { | ||
|
|
||
kaswhy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| @Test | ||
| void addMember_ShouldSaveRecruitMemberAndAnswers() { | ||
| // given | ||
| RecruitMemberRequest recruitMemberRequest = RecruitMemberRequest.builder() | ||
| .name("김소연") | ||
| .grade("4") | ||
| .studentId("122123388") | ||
| .enrolledClassification("정등록") | ||
| .phoneNumber("010-1111-2332") | ||
| .nationality("대한민국") | ||
| .email("[email protected]") | ||
| .gender("여자") | ||
| .birth(LocalDate.of(2002, 8, 18)) | ||
| .major("컴퓨터공학과") | ||
| .doubleMajor("복수전공 인공지능공학과") | ||
| .isPayed(true) | ||
| .build(); | ||
kaswhy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Map<String, Object> answers = Map.of( | ||
| "gdgUserMotive", "그냥", | ||
| "gdgUserStory", "삶", | ||
| "gdgInterest", List.of("FrontEnd", "BackEnd"), | ||
| "gdgPeriod", List.of("23-1", "24-1"), | ||
| "gdgRoute", "에타", | ||
| "gdgExpect", List.of("djqt"), | ||
| "gdgWish", List.of("a", "b", "c"), | ||
| "gdgFeedback", "asdfsdf" | ||
| ); | ||
|
|
||
|
|
||
| RecruitMember savedMember = RecruitMember.builder() | ||
| .id(1L) // 저장될 ID | ||
| .name("김소연") | ||
| .grade("4") | ||
| .studentId("122123388") | ||
| .enrolledClassification(EnrolledClassification.FULL_REGISTRATION) | ||
| .phoneNumber("010-1111-2332") | ||
| .nationality("대한민국") | ||
| .email("[email protected]") | ||
| .gender(Gender.FEMALE) | ||
| .birth(LocalDate.of(2002, 8, 18)) | ||
| .major("컴퓨터공학과") | ||
| .doubleMajor("복수전공 인공지능공학과") | ||
| .isPayed(true) | ||
| .build(); | ||
|
|
||
| } | ||
| } | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.