I've created a custom sink off of the JDBC Sink Starter. The input to the sink is JSON content, but when the sink receives the message I receive the following error in the logs:
Property or field 'field' cannot be found on object of type 'byte[]'
I'm using the property jdbc.columns as follows:
jdbc.columns=FIELD_COLUMN:field
The processor feeding the sink is sending the message as:
String payload = objectMapper.writeValueAsString(message);
output.send(MessageBuilder
.withPayload(payload)
.setHeader("contentType", "application/json")
.build());
org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-jdbc:2.1.0.RELEASE- dardo