Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public class SimpleBean {
  2. public List<Object> constructObject() {
  3. List<Object> objects = new ArrayList<>();
  4. // construct objects
  5. return objects;
  6. }
  7. }
  8.  
  9. @Override
  10. public void configure() throws Exception {
  11. from("quartz expression")
  12. .log(LoggingLevel.INFO, LOGGER, "work started")
  13. .bean(simpleBean, "constructObjects")
  14. .marshal()
  15. .json(JsonLibrary.Jackson)
  16. .to("file:C:/data/export/JSON")
  17. .setHeader(Exchange.FILE_NAME, constant("test.json"))
  18. .log(LoggingLevel.INFO, LOGGER, "work completed");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement