Код: Выделить всё
from("jetty:http://0.0.0.0:6060/updateData")
.log("Received update request: ${body}")
.setBody(simple("UPDATE my_table SET data = :#${body[data]} WHERE id = :#${body[id]}"))
.to("sql:update") // Replace with your actual SQL query and dataSource
.setBody(simple("Data updated at ${date:now:yyyy-MM-dd HH:mm:ss}"))
.to("direct:notifyServiceB");
// Route to notify Service B using HTTP
from("direct:notifyServiceB")
.log("Notifying Service B")
.to("http://localhost:8081/serviceB/notify")
.log("Notification sent to Service B");
Не удалось вызвать метод: [данные] в org.apache.camel.converter.stream.InputStreamCache из-за: java.lang.IndexOutOfBoundsException: Ключ: данные не найдены в bean-компоненте: org.apache.camel.converter.stream.InputStreamCache@8bc328c типа: org. apache.camel.converter.stream.InputStreamCache с использованием пути OGNL [[data]
Подробнее здесь: https://stackoverflow.com/questions/786 ... apache-cam