시리즈 상세 - 번역 데이터 조회 기능 추가

This commit is contained in:
2025-12-16 03:29:02 +09:00
parent 4c0be733d0
commit 30a104981c
2 changed files with 7 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
import org.springframework.stereotype.Service
import org.springframework.web.client.RestTemplate
import org.springframework.web.client.postForEntity
@Service
class PapagoTranslationService(
@@ -46,10 +47,9 @@ class PapagoTranslationService(
val requestEntity = HttpEntity(body, headers)
val response = restTemplate.postForEntity(
val response = restTemplate.postForEntity<PapagoTranslationResponse>(
papagoTranslateUrl,
requestEntity,
PapagoTranslationResponse::class.java
requestEntity
)
if (!response.statusCode.is2xxSuccessful) {