Example usage for org.springframework.integration.file.dsl Files outboundAdapter

List of usage examples for org.springframework.integration.file.dsl Files outboundAdapter

Introduction

In this page you can find the example usage for org.springframework.integration.file.dsl Files outboundAdapter.

Prototype

public static <P> FileWritingMessageHandlerSpec outboundAdapter(Function<Message<P>, ?> directoryFunction) 

Source Link

Document

Create a FileWritingMessageHandlerSpec builder for the one-way FileWritingMessageHandler .

Usage

From source file:org.springframework.integration.samples.filesplit.Application.java

@Bean
public FileWritingMessageHandler fileOut() {
    return Files.outboundAdapter("'/tmp/out'").appendNewLine(true)
            .fileNameExpression("payload.substring(1, 4) + '.txt'").get();
}