-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from woowa-techcamp-2024/feature/139-restaura…
…nt-exposure-webflux [feature] 가게 노출의 요청과 응답을 비동기로 처리한다.
- Loading branch information
Showing
18 changed files
with
163 additions
and
97 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
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,11 +1,5 @@ | ||
subprojects { | ||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
// util | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
// mapper | ||
implementation 'org.mapstruct:mapstruct:1.5.3.Final' | ||
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.3.Final' | ||
|
||
} | ||
} |
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,5 @@ | ||
dependencies { | ||
// db | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
} |
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,16 +1,12 @@ | ||
dependencies { | ||
// web | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-webflux' | ||
|
||
// module | ||
implementation project(":core-web") | ||
implementation project(":api-client:cache-client") | ||
implementation project(":api-client:search-client") | ||
implementation project(":api-client:delivery-client") | ||
implementation project(":api-client:coupon-client") | ||
implementation project(":api-client:advertisement-client") | ||
implementation project(":domain:exposure-common-domain") | ||
// implementation project(":domain:search-domain-rdb") | ||
// implementation project(":domain:search-domain-es") | ||
} |
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
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
51 changes: 51 additions & 0 deletions
51
...vice/src/main/java/woowa/team4/bff/restauarntexposureservice/exposure/utils/ApiUtils.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,51 @@ | ||
package woowa.team4.bff.restauarntexposureservice.exposure.utils; | ||
|
||
import lombok.ToString; | ||
|
||
/** | ||
* API 응답을 표준화하기 위한 유틸리티 클래스이다. 이 클래스는 성공 및 오류 응답을 생성하는 메서드와 응답 형식을 정의하는 내부 클래스를 제공한다. | ||
*/ | ||
public class ApiUtils { | ||
|
||
/** | ||
* 성공적인 API 응답을 생성 | ||
* | ||
* @param response 응답 데이터 | ||
* @param <T> 응답 데이터의 타입 | ||
* @return 성공 상태와 응답 데이터를 포함한 ApiResult 객체 | ||
*/ | ||
public static <T> ApiResult<T> success(T response) { | ||
return new ApiResult<>(true, response, null); | ||
} | ||
|
||
/** | ||
* API 응답 결과를 나타내는 내부 클래스 | ||
* | ||
* @param <T> 응답 데이터의 타입 | ||
*/ | ||
@ToString | ||
public static class ApiResult<T> { | ||
|
||
private final boolean success; | ||
private final T response; | ||
private final String error; | ||
|
||
private ApiResult(boolean success, T response, String error) { | ||
this.success = success; | ||
this.response = response; | ||
this.error = error; | ||
} | ||
|
||
public boolean isSuccess() { | ||
return success; | ||
} | ||
|
||
public String getError() { | ||
return error; | ||
} | ||
|
||
public T getResponse() { | ||
return response; | ||
} | ||
} | ||
} |
Oops, something went wrong.