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

[BE] 초기 프로젝트 설정 #363

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.happy.friendogly.infra;


import com.happy.friendogly.exception.FriendoglyException;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
Expand All @@ -11,6 +12,10 @@ public class FakeS3StorageManager implements FileStorageManager {

@Override
public String uploadFile(MultipartFile file) {
if (file == null || file.isEmpty()) {
throw new FriendoglyException("이미지 파일은 비어 있을 수 없습니다.");
}

return "http://localhost/" + file.getOriginalFilename();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Profile("!local")
public class S3StorageManager implements FileStorageManager {

private static final int FILE_SIZE_LIMIT = 5;
private static final int FILE_SIZE_LIMIT = 1;
private static final int MB = 1_048_576;

@Value("${aws.s3.bucket-name}")
Expand All @@ -45,6 +45,10 @@ public S3StorageManager() {

@Override
public String uploadFile(MultipartFile file) {
if (file == null || file.isEmpty()) {
throw new FriendoglyException("이미지 파일은 비어 있을 수 없습니다.");
}

if (file.getSize() > FILE_SIZE_LIMIT * MB) {
throw new FriendoglyException(String.format("%dMB 미만의 사진만 업로드 가능합니다.", FILE_SIZE_LIMIT));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public SaveMemberResponse saveMember(SaveMemberRequest request, MultipartFile im
}

String kakaoMemberId = kakaoOauthClient.getUserInfo(request.accessToken()).id();
System.out.println("===============" + kakaoMemberId + "============");

Member member = Member.builder()
.name(request.name())
Expand Down

This file was deleted.

4 changes: 3 additions & 1 deletion backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ management:
prometheus:
enabled: true


endpoints:
web:
exposure:
include: "*"

server:
port: 8081
Loading