-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: s3 의존성 추가 * feat: image 도메인 추가 * feat: AmazonS3 빈으로 등 * feat: ImageExtension Exception 정의 * feat: MultipartFile을 구현한 UploadFile을 추가 * feat: Image 업로드, 삭제를 위한 기반 코드 구현 * feat: 의존성 역전을 위한 IdeaValidator와 ImageRepository 추가 * feat: image upload 기능 구현 * feat: image delete 기능 구현 * feat: image 업로드 api 구현 * feat: image 삭제 api 구현 * feat: 아이디어 조회시 이미지도 조회 가능하도록 수정 * feat: consumes 타입 및 RequestPart 추가 * refactor: image->images 로 Restful 하게 변경 * refactor: image 들을 저장할 수 있도록 변경 * refactor: 이미지 추가 API 가 아무것도 반환하지 않도록 수정 * refactor: Swagger UI 적용 * chore: s3 bucket 및 cloud front url을 application.yml 에 추가 * refactor: image 이름 규칙 변경 * chore: build시 jar 이름 설정 * feat: ImageChecker 구현 * refactor: deleteImages->updateImages로 API 변경 * refactor: MultipartFormData를 받을 수 있도록 수정 * refactor: 응답은 ok로 반환할 수 있도록 수정 * refactor: 테스트 완료 후 원래대로 코드 수정 * refactor: 이미지 추가 시 예외 처리 강화 * refactor: ImageChecker에 AdditionImagesSize를 검증하는 책임을 위임 * test: ideaValidator Test 작성 * test: ImageChecker Test 작성 * refactor: ideaValidator가 바로 예외를 발생시킬 수 있도록 수정 * refactor: s3Client 분리 * refactor: 사용하지 않는 코드 삭제 * refactor: 요청 한번에 처리할 수 있도록 수정 * refactor: test 수정 * refactor: ImageResponse 생성 방법 수정
- Loading branch information
Showing
23 changed files
with
740 additions
and
59 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
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.