안녕하세요 강의 잘 듣고 있습니다.
실습 프로젝트 코드 작성해서 apiJob 실행했더니 아래와 같은 에러가 발생합니다.
해당문제는 sprinb batch version으로 인한 문제인걸로 보이는데 (물론 오타로 인한 에러를 찾지 못하고 있을수도 있습니다) 구글링과 에러내용에서 권장하는 ObjecpMapper를 이용해도 동일한 에러가 발생해서 해결방법을 알려주시면 감사하겠습니다.
# 이슈
https://github.com/spring-projects/spring-batch/issues/3732
# Source Git Repository
https://github.com/goodbyeyo/spring-batch
# 에러내용
java.lang.IllegalArgumentException: Unable to deserialize the execution context
Caused by: com.fasterxml.jackson.databind.JsonMappingException: The class with study.batch.batchService.domain.ProductVO and name of study.batch.batchService.domain.ProductVO is not trusted. If you believe this class is safe to deserialize, you can add it to the base set of trusted classes at construction time or provide an explicit mapping using Jackson annotations or a custom ObjectMapper. If the serialization is only done by a trusted source, you can also enable default typing. (through reference chain: java.util.HashMap["product"])
Caused by: java.lang.IllegalArgumentException: The class with study.batch.batchService.domain.ProductVO and name of study.batch.batchService.domain.ProductVO is not trusted. If you believe this class is safe to deserialize, you can add it to the base set of trusted classes at construction time or provide an explicit mapping using Jackson annotations or a custom ObjectMapper. If the serialization is only done by a trusted source, you can also enable default typing.