-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 이미지 업로드 기능을 구현한다. #91
+740
−59
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ebdffb6
chore: s3 의존성 추가
kpeel5839 7e7b427
feat: image 도메인 추가
kpeel5839 1b8ef9e
feat: AmazonS3 빈으로 등
kpeel5839 8708ff9
feat: ImageExtension Exception 정의
kpeel5839 0b1e150
feat: MultipartFile을 구현한 UploadFile을 추가
kpeel5839 bdcde5e
feat: Image 업로드, 삭제를 위한 기반 코드 구현
kpeel5839 9000875
feat: 의존성 역전을 위한 IdeaValidator와 ImageRepository 추가
kpeel5839 9e8670b
feat: image upload 기능 구현
kpeel5839 5c856cc
feat: image delete 기능 구현
kpeel5839 ffa88f0
feat: image 업로드 api 구현
kpeel5839 b8294f4
feat: image 삭제 api 구현
kpeel5839 ef54292
feat: 아이디어 조회시 이미지도 조회 가능하도록 수정
kpeel5839 a30e24f
feat: consumes 타입 및 RequestPart 추가
kpeel5839 4dbc676
refactor: image->images 로 Restful 하게 변경
kpeel5839 7c00b25
refactor: image 들을 저장할 수 있도록 변경
kpeel5839 63462d2
refactor: 이미지 추가 API 가 아무것도 반환하지 않도록 수정
kpeel5839 6e32b5e
refactor: Swagger UI 적용
kpeel5839 779d50f
chore: s3 bucket 및 cloud front url을 application.yml 에 추가
kpeel5839 1b4c001
refactor: image 이름 규칙 변경
kpeel5839 ee1f309
chore: build시 jar 이름 설정
kpeel5839 8d906ba
feat: ImageChecker 구현
kpeel5839 d7ec1c4
refactor: deleteImages->updateImages로 API 변경
kpeel5839 e62eab7
refactor: MultipartFormData를 받을 수 있도록 수정
kpeel5839 d6b59a7
refactor: 응답은 ok로 반환할 수 있도록 수정
kpeel5839 a511c70
refactor: 테스트 완료 후 원래대로 코드 수정
kpeel5839 67e220b
refactor: 이미지 추가 시 예외 처리 강화
kpeel5839 dc6954c
refactor: ImageChecker에 AdditionImagesSize를 검증하는 책임을 위임
kpeel5839 3138399
test: ideaValidator Test 작성
kpeel5839 4ec7201
test: ImageChecker Test 작성
kpeel5839 6b8b16b
refactor: ideaValidator가 바로 예외를 발생시킬 수 있도록 수정
kpeel5839 0150da5
refactor: s3Client 분리
kpeel5839 648259b
refactor: 사용하지 않는 코드 삭제
kpeel5839 9f5140b
refactor: 요청 한번에 처리할 수 있도록 수정
kpeel5839 a61e0cf
refactor: test 수정
kpeel5839 610d7f0
refactor: ImageResponse 생성 방법 수정
kpeel5839 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package kr.co.conceptbe.common.config; | ||
|
||
import com.amazonaws.auth.InstanceProfileCredentialsProvider; | ||
import com.amazonaws.regions.Regions; | ||
import com.amazonaws.services.s3.AmazonS3; | ||
import com.amazonaws.services.s3.AmazonS3ClientBuilder; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class S3Config { | ||
|
||
@Bean | ||
public InstanceProfileCredentialsProvider instanceProfileCredentialsProvider() { | ||
return InstanceProfileCredentialsProvider.getInstance(); | ||
} | ||
|
||
@Bean | ||
public AmazonS3 amazonS3() { | ||
return AmazonS3ClientBuilder.standard() | ||
.withRegion(Regions.AP_NORTHEAST_2) | ||
.withCredentials(instanceProfileCredentialsProvider()) | ||
.build(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요것만 추가했어요! 의존성에서는용