How can I create http outbound-gateway with JAVA config in Spring integration? -


i have following http outbound gateway. how can configuration java config or spring dsl?

<int-http:outbound-gateway id="test"                            url="http://localhost:8080/"                            http-method="post"                            charset="utf-8"                            header-mapper="soapheadermapper"                            request-factory="requestfactory"                            request-channel="inputchannel"/> 

@bean public integrationflow httpout() {     return integrationflows.from("inputchannel")             .handle(http.outboundgateway("http://localhost:8080/")                     .charset("utf-8")                     .httpmethod(httpmethod.post)                     .headermapper(soapheadermapper())                     .requestfactory(requestfactory()), e -> e.id("test"))             .get(); } 

or

@serviceactivator(inputchannel="inputchannel") @bean(name="test") public messagehandler httpout() {     httprequestexecutingmessagehandler handler = new ...     ...     return handler; } 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -