use of org.springframework.integration.file.FileWritingMessageHandler in project tutorials by eugenp.
the class FileCopyConfig method fileWritingMessageHandler.
@Bean
@ServiceActivator(inputChannel = "fileChannel")
public MessageHandler fileWritingMessageHandler() {
FileWritingMessageHandler handler = new FileWritingMessageHandler(new File(OUTPUT_DIR));
handler.setFileExistsMode(FileExistsMode.REPLACE);
handler.setExpectReply(false);
return handler;
}
use of org.springframework.integration.file.FileWritingMessageHandler in project spring-boot by spring-projects.
the class SampleIntegrationApplication method fileWriter.
@Bean
public FileWritingMessageHandler fileWriter() {
FileWritingMessageHandler writer = new FileWritingMessageHandler(this.serviceProperties.getOutputDir());
writer.setExpectReply(false);
return writer;
}
Aggregations