diff --git a/PaimonGanyu/application/src/main/java/org/binchoo/paimonganyu/chatbot/controllers/resolvers/ServletRequestSkillPayloadResolver.java b/PaimonGanyu/application/src/main/java/org/binchoo/paimonganyu/chatbot/controllers/resolvers/CachedSkillPayloadResolver.java similarity index 89% rename from PaimonGanyu/application/src/main/java/org/binchoo/paimonganyu/chatbot/controllers/resolvers/ServletRequestSkillPayloadResolver.java rename to PaimonGanyu/application/src/main/java/org/binchoo/paimonganyu/chatbot/controllers/resolvers/CachedSkillPayloadResolver.java index 448ba2b5..2063c616 100644 --- a/PaimonGanyu/application/src/main/java/org/binchoo/paimonganyu/chatbot/controllers/resolvers/ServletRequestSkillPayloadResolver.java +++ b/PaimonGanyu/application/src/main/java/org/binchoo/paimonganyu/chatbot/controllers/resolvers/CachedSkillPayloadResolver.java @@ -19,9 +19,9 @@ @Slf4j @RequiredArgsConstructor @Component -public class ServletRequestSkillPayloadResolver implements SkillPayloadResolver { +public class CachedSkillPayloadResolver implements SkillPayloadResolver { - private final ObjectMapper mapper; + private final ObjectMapper objectMapper; @Override public SkillPayload resolve(HttpServletRequest request) { @@ -46,7 +46,7 @@ private byte[] getCachedContent(ContentCachingRequestWrapper request) { private SkillPayload deserialize(byte[] requestBody) throws IOException { try { - return mapper.readValue(requestBody, SkillPayload.class); + return objectMapper.readValue(requestBody, SkillPayload.class); } catch (IOException e) { log.debug("Failed to deserialize a request body", e); log.debug("Payload: {}", requestBody);