Skip to content
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

chore: ImageUpload api 구현 #15

Closed
wants to merge 4 commits into from
Closed

chore: ImageUpload api 구현 #15

wants to merge 4 commits into from

Conversation

jihyo-j
Copy link
Member

@jihyo-j jihyo-j commented Feb 28, 2024

S3 이용한 이미지 업로드 기능 api


@Service
@RequiredArgsConstructor
public class AwsS3Service {
Copy link
Member

@tlarbals824 tlarbals824 Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우선 패키지 먼저 정리하자
일단 내가 생각하는 패키지 구조는

  • Application
    • controller
    • application service
  • Domain
    • domain
    • repository
    • domain service
  • infra
    • domain
      • domain entity
      • repository impl(jpa)
      • mapper
    • config
    • image
      • AwsS3ImageUploader
  • global
    • 어디서든 사용되는 클래스(ex. ApiResponse, BusinessException, 이미지 업로드 인터페이스 등등)

이렇게 생각중이야

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그래서 일단 이미지 업로드 패키지를 common에다가 둬서

  • common
    • image
      • ImageUploader (interface)
        이렇게 인터페이스만 정의하고

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public interface ImageUploader{
    List<String> uploadImage(List<MultipartFile> multipartFile);
    public void deleteImage(String fileName);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그 구현체들은 infra 패키지에 구현을 해주면 좋을 것 같아. 어떻게 생각해?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이게 훨씬 깔끔하겠다. 그러면 다시 패키지 정리해서 올릴게!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants