spring-integration

Stored proc outbound gateway null parameter handling

你。 提交于 2019-12-24 05:12:29
问题 How can i make this code work even if payload.second is null (optional parameter). <int-jdbc:stored-proc-outbound-gateway id="outGtw" data-source="someDs" request-channel="someChannel" reply-channel="someOtherChannel" stored-procedure-name="someStoredProcedure" ignore-column-meta-data="true"> <int-jdbc:sql-parameter-definition name="first"/> <int-jdbc:sql-parameter-definition name="second"/> <int-jdbc:sql-parameter-definition name="outParam" direction="OUT" type="NVARCHAR"/> <int-jdbc

Stored proc outbound gateway null parameter handling

99封情书 提交于 2019-12-24 05:12:02
问题 How can i make this code work even if payload.second is null (optional parameter). <int-jdbc:stored-proc-outbound-gateway id="outGtw" data-source="someDs" request-channel="someChannel" reply-channel="someOtherChannel" stored-procedure-name="someStoredProcedure" ignore-column-meta-data="true"> <int-jdbc:sql-parameter-definition name="first"/> <int-jdbc:sql-parameter-definition name="second"/> <int-jdbc:sql-parameter-definition name="outParam" direction="OUT" type="NVARCHAR"/> <int-jdbc

How to create custom component and add it to flow in spring java dsl?

一个人想着一个人 提交于 2019-12-24 05:05:16
问题 I want to create a customer component trace() and want to use it in the flow. Something like CustomFlows.from("").trace().get(); Can you suggest me how to do it? Seems like IntegrationFlowDefinition is closed and not extendable. 回答1: That is an interesting technique... But right now I'm not convinced that we should allow such a extension for the FlowBuilder ... Feel free to raise GitHub issue on the matter and we will see in the future how to be with that. For such an extension you should

Uploading files directly to specific folder in ftp server using spring spring

邮差的信 提交于 2019-12-24 05:05:09
问题 I have, I suppose, really newbie question but the fact is I'm newbie in spring framework. How can I upload files to, for example 'upload' folder loceted in root directory of my ftp server? I have tried this: My application context file: <bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory"> <property name="host" value="127.0.0.1"/> <property name="username" value="test"/> <property name="password" value="test"/> <property name="clientMode"

How to create custom component and add it to flow in spring java dsl?

谁说我不能喝 提交于 2019-12-24 05:05:03
问题 I want to create a customer component trace() and want to use it in the flow. Something like CustomFlows.from("").trace().get(); Can you suggest me how to do it? Seems like IntegrationFlowDefinition is closed and not extendable. 回答1: That is an interesting technique... But right now I'm not convinced that we should allow such a extension for the FlowBuilder ... Feel free to raise GitHub issue on the matter and we will see in the future how to be with that. For such an extension you should

How to put “new line” in Spring Expression Language?

风格不统一 提交于 2019-12-24 03:38:06
问题 What would be the exact SpEL expression to go to the new line. Here is my configuration: <logging-channel-adapter id="log" channel="loggingChannel" level="INFO" expression="'DealId: '+ payload.dealId \n + 'Name: '+ payload.name" /> 回答1: You can use this as a work-around: <int:logging-channel-adapter id="loggingChannel" logger-name="tapInbound" expression="'DealId: '+ payload.dealId + T(System).getProperty('line.separator') + 'Name: '+ payload.name" level="INFO" /> EDIT: Just to clarify, SpEL

Spring integration - how to check a directory for files, without polling?

纵然是瞬间 提交于 2019-12-24 03:31:08
问题 Is there a way in spring integration, (either using int-file:inbound-channel-adapter or any other means) to simply check a directory for file (preferably pattern match) without polling and if file exists, fetch it and process further and if it doesn't, simply quit (i can use routers for conditional redirects) .. the thing i'm trying to achieve is to control the flow based on a simple once-off file check instead of polling the directory like a file-watcher. OR will I have to do it in Java,

Exit Spring Integration when no more messages

核能气质少年 提交于 2019-12-24 03:29:31
问题 I'm using a Spring Integration (4.1) config to retrieve message from DB as a batch more than as a service. I know I'll have a dozen of messages to process daily, and therefore I need to run the batch once a day. My jdbc:inbound-channel-adapter is configured to retrieve max-rows-per-poll="1". I'd like to be notified in some way when there are no more messages, so that I can exit the batch, but I have issues finding where to "plug". I tried with an interceptor that remembers when last message

com.jcraft.jsch.JSchException: verify: false

安稳与你 提交于 2019-12-24 02:55:26
问题 I am trying the code given at https://github.com/spring-projects/spring-integration-samples/tree/master/basic/sftp, and when i am running the test in Eclipse it get passed but when i am trying it through maven(mvn clean compile test) it is getting failed with below stack trace org.springframework.messaging.MessagingException: Failed to obtain pooled item; nested exception is java.lang.IllegalStateException: failed to create SFTP Session at org.springframework.integration.util.SimplePool

Spring Integration Kafka vs Spring Kafka

社会主义新天地 提交于 2019-12-24 01:47:05
问题 We are trying to implement a message channel between a worker spring application and a consumer spring application (there will be replicas of the same consumer on multiple JVMs) With the Java Config there is limited documentation for the spring integration and I was able to find a documentation for the spring Kafka.I am not exactly sure how the dependency is working, Is spring Kafka integration is based on Spring Kafka. Please give an idea on this? Where can I find proper documentation for