-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: connect with lambda in generate First Question API
람다와 통신해서 첫번째 질문 생성하는 API 완료
- Loading branch information
1 parent
424f927
commit ddec471
Showing
5 changed files
with
57 additions
and
7 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
10 changes: 10 additions & 0 deletions
10
src/main/java/capstone/bookdiary/domain/dto/FeignQuestionDto.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,10 @@ | ||
package capstone.bookdiary.domain.dto; | ||
|
||
import lombok.Getter; | ||
import org.json.JSONObject; | ||
|
||
@Getter | ||
public class FeignQuestionDto { | ||
private Integer statusCode; | ||
private JSONObject body; | ||
} |
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
13 changes: 13 additions & 0 deletions
13
src/main/java/capstone/bookdiary/feign/FirstQuestionClient.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,13 @@ | ||
package capstone.bookdiary.feign; | ||
|
||
import capstone.bookdiary.domain.dto.FeignQuestionDto; | ||
import java.util.Map; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
@FeignClient(name = "firstQuestion", url = "https://6abaok06nf.execute-api.ap-northeast-2.amazonaws.com/TexttoText1/TextLambdaFunction1") | ||
public interface FirstQuestionClient { | ||
@PostMapping | ||
FeignQuestionDto getFirstQuestion(@RequestBody Map<String, Object> scrapMemo); | ||
} |
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