-
Notifications
You must be signed in to change notification settings - Fork 0
[DEV-89/BE] feat: 면접 pdf 파일 업로드 api 개발 #387
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
The head ref may contain hidden characters: "DEV-89/feat/\uBA74\uC811-PDF-\uD30C\uC77C-\uC5C5\uB85C\uB4DC-API-\uAC1C\uBC1C"
Merged
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ce47723
chore: AWS SDK 의존성 추가
zxc534 fe28b08
feat: controller 작성
zxc534 0ca3637
feat: 응답 dto 작성
zxc534 45199d2
feat: 서비스 초안 작성
zxc534 3c01300
chore: 의존성 변경
zxc534 fc34954
feat: 상수 값 추가
zxc534 68c27cd
feat: 응답 dto 수정
zxc534 d925d3d
feat: S3Presigner 빈 등록
zxc534 b87c242
feat: 서비스 로직 구현
zxc534 f27e3e2
chore: spotless 적용
zxc534 021ced2
Merge remote-tracking branch 'origin/dev' into DEV-89/feat/면접-PDF-파일-…
zxc534 b7ed0cb
test: 테스트 yml 수정
zxc534 97d9012
feat: PDF 업로드 url 생성 메소드를 transactional readOnly로 변경
zxc534 809a2fe
chore: 메소드명 통일
zxc534 3a825dc
chore: yml 정보를 env로 이동
zxc534 b110cc7
chore: spotless 적용
zxc534 a48fd2d
merge origin/dev
zxc534 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
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
6 changes: 6 additions & 0 deletions
6
.../main/java/com/shyashyashya/refit/domain/interview/dto/response/PdfUploadUrlResponse.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,6 @@ | ||
| package com.shyashyashya.refit.domain.interview.dto.response; | ||
|
|
||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record PdfUploadUrlResponse( | ||
| @NotNull String url, @NotNull String key) {} |
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
24 changes: 24 additions & 0 deletions
24
backend/src/main/java/com/shyashyashya/refit/global/config/S3Config.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,24 @@ | ||
| package com.shyashyashya.refit.global.config; | ||
|
|
||
| import com.shyashyashya.refit.global.property.S3Property; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
| import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider; | ||
| import software.amazon.awssdk.regions.Region; | ||
| import software.amazon.awssdk.services.s3.presigner.S3Presigner; | ||
|
|
||
| @Configuration | ||
| @RequiredArgsConstructor | ||
| public class S3Config { | ||
|
|
||
| private final S3Property s3Property; | ||
|
|
||
| @Bean | ||
| public S3Presigner s3Presigner() { | ||
| return S3Presigner.builder() | ||
| .region(Region.of(s3Property.region())) | ||
| .credentialsProvider(DefaultCredentialsProvider.create()) | ||
| .build(); | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
backend/src/main/java/com/shyashyashya/refit/global/property/S3Property.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,13 @@ | ||
| package com.shyashyashya.refit.global.property; | ||
|
|
||
| import jakarta.validation.constraints.NotBlank; | ||
| import org.springframework.boot.context.properties.ConfigurationProperties; | ||
| import org.springframework.validation.annotation.Validated; | ||
|
|
||
| @ConfigurationProperties(prefix = "spring.s3") | ||
| @Validated | ||
| public record S3Property( | ||
| @NotBlank String region, | ||
| @NotBlank String bucket, | ||
| @NotBlank String prefix, | ||
| int presignExpireSeconds) {} |
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,6 @@ | ||
| spring: | ||
| s3: | ||
| region: "ap-northeast-2" | ||
| bucket: "refit-s3-bucket" | ||
| prefix: "interview-pdf/" | ||
| presign-expire-seconds: 300 | ||
zxc534 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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,6 @@ | ||
| spring: | ||
| s3: | ||
| region: "ap-northeast-2" | ||
| bucket: "refit-s3-bucket" | ||
| prefix: "interview-pdf/" | ||
| presign-expire-seconds: 300 | ||
zxc534 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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 |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ spring: | |
| include: | ||
| - auth | ||
| - gemini | ||
| - s3 | ||
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.