Я хочу сохранить содержимое с локального хоста (данные json) Пример:
"id": 1,
"prename": "Noel",
"surname": "Reyes",
"dateOfBirth": "1988-09-07",
"birthPlace": "Bad Ems",
"gender": "M"}
) в txt.file (C: \ inputFolder в Example.txt).Вот мой код:
from("timer://foo?period=5s")
.to("http4://localhost:8091/customers/")
.log("Test3 ${body}")
.to("file:C:/inputFolder/Example.txt")
;
Но: Мой маршрут1 запущен и использует локальный хост, но не сохраняет его в текстовом файле.
main] DefaultCamelContext INFO Apache Camel 2.22.2 (CamelContext: camel-1) is starting
[ main] ManagedManagementStrategy INFO JMX is enabled
[ main] DefaultTypeConverter INFO Type converters loaded (core: 195, classpath: 15)
[ main] HttpComponent INFO Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@24c4ddae
[ main] DefaultCamelContext INFO StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
[ main] DefaultCamelContext INFO Route: route1 started and consuming from: timer://foo?period=5s
[ main] DefaultCamelContext INFO Total 1 routes, of which 1 are started
[ main] DefaultCamelContext INFO Apache Camel 2.22.2 (CamelContext: camel-1) started in 2.945 seconds
Process finished with exit code 0
Можетты мне помогаешь?