【发布时间】:2018-06-22 11:20:30
【问题描述】:
我正在尝试设置 spring-integration 分区。
我正在使用堆栈 spring-batch & integration & AWS SQS
Master - 网格大小的完整分区。
Master - 将对象(StepExecutionRequest)传输到 JSON (@Transformer ObjectToJsonTransformer)
Master - 发送 SQS。
Slave - 接收 SQS
Slave - 将 JSON 传输到 Object(StepExecutionRequest) (@Transformer JsonToObjectTransformer)
那么,发生的异常:
2018-06-22 17:40:55.578 ERROR 33730 --- [ask-scheduler-1] o.s.integration.handler.LoggingHandler : org.springframework.integration.transformer.MessageTransformationException: failed to transform message; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.springframework.batch.integration.partition.StepExecutionRequest` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
即StepExecutionRequest 无法反序列化,因为StepExecutionReuqest 不是setter。
我该如何解决这个问题?
【问题讨论】:
标签: spring-integration spring-batch amazon-sqs