-
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.
Merge branch 'develop' into feature/57
- Loading branch information
Showing
100 changed files
with
3,663 additions
and
409 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 |
---|---|---|
@@ -1,18 +1,11 @@ | ||
=== 로그인 | ||
==== 요청 | ||
include::{snippets}/authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다/http-request.adoc[] | ||
include::{snippets}/authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다/request-headers.adoc[] | ||
include::{snippets}/authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다/path-parameters.adoc[] | ||
include::{snippets}/authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다/request-fields.adoc[] | ||
operation::authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다[snippets='http-request,request-headers,path-parameters,request-fields'] | ||
==== 응답 | ||
include::{snippets}/authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다/http-response.adoc[] | ||
include::{snippets}/authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다/response-fields.adoc[] | ||
operation::authentication-controller-test/oauth_access_token을_통해_로그인시_첫_로그인이라면_회원가입_여부를_참으로_반환한다[snippets='http-response,response-fields'] | ||
|
||
=== Access Token 재발급 | ||
==== 요청 | ||
include::{snippets}/authentication-controller-test/refresh_token을_통해_access_token을_재발행한다/http-request.adoc[] | ||
include::{snippets}/authentication-controller-test/refresh_token을_통해_access_token을_재발행한다/request-headers.adoc[] | ||
include::{snippets}/authentication-controller-test/refresh_token을_통해_access_token을_재발행한다/request-fields.adoc[] | ||
operation::authentication-controller-test/refresh_token을_통해_access_token을_재발행한다[snippets='http-request,request-headers,request-fields'] | ||
==== 응답 | ||
include::{snippets}/authentication-controller-test/refresh_token을_통해_access_token을_재발행한다/http-response.adoc[] | ||
include::{snippets}/authentication-controller-test/refresh_token을_통해_access_token을_재발행한다/response-fields.adoc[] | ||
operation::authentication-controller-test/refresh_token을_통해_access_token을_재발행한다[snippets='http-response,response-fields'] |
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 |
---|---|---|
|
@@ -48,3 +48,5 @@ include::stamp.adoc[] | |
== 콕 찌르기 | ||
include::poke.adoc[] | ||
|
||
== 신고 | ||
include::report.adoc[] |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
=== 알림 목록 조회 | ||
==== 요청 | ||
include::{snippets}/notification-controller-test/사용자의_알림_목록을_조회한다/http-request.adoc[] | ||
include::{snippets}/notification-controller-test/사용자의_알림_목록을_조회한다/request-headers.adoc[] | ||
operation::notification-controller-test/사용자의_알림_목록을_조회한다[snippets='http-request,request-headers'] | ||
==== 응답 | ||
include::{snippets}/notification-controller-test/사용자의_알림_목록을_조회한다/http-response.adoc[] | ||
include::{snippets}/notification-controller-test/사용자의_알림_목록을_조회한다/response-fields.adoc[] | ||
operation::notification-controller-test/사용자의_알림_목록을_조회한다[snippets='http-response,response-fields'] |
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,17 @@ | ||
=== 사용자 신고 | ||
==== 요청 | ||
operation::report-controller-test/사용자를_신고한다[snippets='http-request,request-headers,path-parameters,request-fields'] | ||
==== 응답 | ||
operation::report-controller-test/사용자를_신고한다[snippets='http-response'] | ||
|
||
=== 골 신고 | ||
==== 요청 | ||
operation::report-controller-test/골을_신고한다[snippets='http-request,request-headers,path-parameters,request-fields'] | ||
==== 응답 | ||
operation::report-controller-test/골을_신고한다[snippets='http-response'] | ||
|
||
=== 스탬프 신고 | ||
==== 요청 | ||
operation::report-controller-test/스탬프를_신고한다[snippets='http-request,request-headers,path-parameters,request-fields'] | ||
==== 응답 | ||
operation::report-controller-test/스탬프를_신고한다[snippets='http-response'] |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
=== 전체 테마 색상 목록 조회 | ||
==== 요청 | ||
include::{snippets}/theme-color-controller-test/전체_테마_색상_목록을_조회한다/http-request.adoc[] | ||
include::{snippets}/theme-color-controller-test/전체_테마_색상_목록을_조회한다/request-headers.adoc[] | ||
operation::theme-color-controller-test/전체_테마_색상_목록을_조회한다[snippets='http-request,request-headers'] | ||
==== 응답 | ||
include::{snippets}/theme-color-controller-test/전체_테마_색상_목록을_조회한다/http-response.adoc[] | ||
include::{snippets}/theme-color-controller-test/전체_테마_색상_목록을_조회한다/response-fields.adoc[] | ||
operation::theme-color-controller-test/전체_테마_색상_목록을_조회한다[snippets='http-response,response-fields'] |
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 |
---|---|---|
@@ -1,25 +1,18 @@ | ||
=== 사용자 정보 조회 | ||
==== 요청 | ||
include::{snippets}/user-controller-test/사용자_정보를_조회한다/http-request.adoc[] | ||
include::{snippets}/user-controller-test/사용자_정보를_조회한다/request-headers.adoc[] | ||
operation::user-controller-test/사용자_정보를_조회한다[snippets='http-request,request-headers'] | ||
==== 응답 | ||
include::{snippets}/user-controller-test/사용자_정보를_조회한다/http-response.adoc[] | ||
include::{snippets}/user-controller-test/사용자_정보를_조회한다/response-fields.adoc[] | ||
operation::user-controller-test/사용자_정보를_조회한다[snippets='http-response'] | ||
|
||
=== 검색을 통한 사용자 정보 목록 조회 | ||
==== 요청 | ||
include::{snippets}/user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다/http-request.adoc[] | ||
include::{snippets}/user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다/request-headers.adoc[] | ||
include::{snippets}/user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다/query-parameters.adoc[] | ||
operation::user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다[snippets='http-request,request-headers,query-parameters'] | ||
==== 응답 | ||
include::{snippets}/user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다/http-response.adoc[] | ||
include::{snippets}/user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다/response-fields.adoc[] | ||
operation::user-controller-test/검색한_키워드가_이름에_포한된_사용자_목록을_조회한다[snippets='http-response,response-fields'] | ||
|
||
=== 사용자 정보 수정 | ||
==== 요청 | ||
include::{snippets}/user-controller-test/사용자의_모든_정보를_수정한다/http-request.adoc[] | ||
include::{snippets}/user-controller-test/사용자의_모든_정보를_수정한다/request-headers.adoc[] | ||
include::{snippets}/user-controller-test/사용자의_모든_정보를_수정한다/request-fields.adoc[] | ||
operation::user-controller-test/사용자의_모든_정보를_수정한다[snippets='http-request,request-headers,request-parts'] | ||
|
||
==== 응답 | ||
include::{snippets}/user-controller-test/사용자의_모든_정보를_수정한다/http-response.adoc[] | ||
include::{snippets}/user-controller-test/사용자의_모든_정보를_수정한다/response-fields.adoc[] | ||
operation::user-controller-test/사용자의_모든_정보를_수정한다[snippets='http-response,response-fields'] |
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
15 changes: 15 additions & 0 deletions
15
src/main/java/com/backend/blooming/image/application/ImageStorageManager.java
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,15 @@ | ||
package com.backend.blooming.image.application; | ||
|
||
import com.backend.blooming.image.application.util.ImageStoragePath; | ||
import org.springframework.web.multipart.MultipartFile; | ||
import org.testcontainers.shaded.com.google.common.net.MediaType; | ||
|
||
import java.util.List; | ||
|
||
public interface ImageStorageManager { | ||
|
||
List<MediaType> SUPPORTED_MEDIA_TYPE = List.of(MediaType.PNG, MediaType.JPEG, MediaType.parse("image/jpg")); | ||
String EXTENSION_DOT = "."; | ||
|
||
String upload(final MultipartFile multipartFile, final ImageStoragePath path); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/backend/blooming/image/application/util/ImageStoragePath.java
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,15 @@ | ||
package com.backend.blooming.image.application.util; | ||
|
||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public enum ImageStoragePath { | ||
|
||
PROFILE("profile/"); | ||
|
||
private final String path; | ||
} |
53 changes: 53 additions & 0 deletions
53
src/main/java/com/backend/blooming/image/configuration/LocalS3Configuration.java
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,53 @@ | ||
package com.backend.blooming.image.configuration; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
import org.testcontainers.containers.localstack.LocalStackContainer; | ||
import org.testcontainers.utility.DockerImageName; | ||
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; | ||
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; | ||
import software.amazon.awssdk.regions.Region; | ||
import software.amazon.awssdk.services.s3.S3Client; | ||
import software.amazon.awssdk.services.s3.model.CreateBucketRequest; | ||
|
||
import static org.testcontainers.containers.localstack.LocalStackContainer.Service; | ||
|
||
@Profile("test | local") | ||
@Configuration | ||
public class LocalS3Configuration { | ||
|
||
private static final DockerImageName LOCALSTACK_IMAGE = DockerImageName.parse("localstack/localstack:0.11.3"); | ||
|
||
@Value("${cloud.aws.s3.bucket}") | ||
private String bucket; | ||
|
||
@Bean(initMethod = "start", destroyMethod = "stop") | ||
public LocalStackContainer localStackContainer() { | ||
return new LocalStackContainer(LOCALSTACK_IMAGE).withServices(Service.S3); | ||
} | ||
|
||
@Bean | ||
public S3Client s3Client(final LocalStackContainer localStack) { | ||
final S3Client s3Client = S3Client.builder() | ||
.endpointOverride(localStack.getEndpoint()) | ||
.credentialsProvider(getAwsCredentialsProvider(localStack)) | ||
.region(Region.of(localStack.getRegion())) | ||
.build(); | ||
final CreateBucketRequest bucketRequest = CreateBucketRequest.builder() | ||
.bucket(bucket) | ||
.build(); | ||
s3Client.createBucket(bucketRequest); | ||
|
||
return s3Client; | ||
} | ||
|
||
@NotNull | ||
private static StaticCredentialsProvider getAwsCredentialsProvider(final LocalStackContainer localStack) { | ||
return StaticCredentialsProvider.create( | ||
AwsBasicCredentials.create(localStack.getAccessKey(), localStack.getSecretKey()) | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/com/backend/blooming/image/configuration/S3Configuration.java
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,34 @@ | ||
package com.backend.blooming.image.configuration; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; | ||
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; | ||
import software.amazon.awssdk.regions.Region; | ||
import software.amazon.awssdk.services.s3.S3Client; | ||
|
||
@Profile("dev | prod") | ||
@Configuration | ||
public class S3Configuration { | ||
|
||
@Value("${cloud.aws.credentials.access-key}") | ||
private String accessKey; | ||
|
||
@Value("${cloud.aws.credentials.secret-key}") | ||
private String secretKey; | ||
|
||
@Value("${cloud.aws.s3.region}") | ||
private String region; | ||
|
||
@Bean | ||
public S3Client amazonS3() { | ||
final AwsBasicCredentials credentials = AwsBasicCredentials.create(accessKey, secretKey); | ||
|
||
return S3Client.builder() | ||
.region(Region.of(region)) | ||
.credentialsProvider(StaticCredentialsProvider.create(credentials)) | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.