spring-integration

Content-Type on http:inbound-gateway response has charset=iso-8859-1 instead of utf-8

给你一囗甜甜゛ 提交于 2019-12-24 13:55:04
问题 I want to build a ws proxy so I use an http:inbound-gateway. It worked fine but I'm having some trouble with the encoding. All responses have Content-Type: text/plain; charset=iso-8859-1 instead of Content-Type: text/xml; charset=utf-8, so when the response has special characters, they are not sent correctly please, could you tell me how to config this? here's my flow: <int-http:inbound-gateway request-channel="channel" path="/services/router" supported-methods="POST" reply-channel="channel"

Convert Message to Job to make it Spring Integration with Batch Processing

若如初见. 提交于 2019-12-24 13:29:15
问题 I am trying to process a series of files using Spring Integration in a batch fashion. I have this very old xml which tries to convert the messages into jobs <int:transformer ref="messageToJobTransformer"/> <batch-int:job-launching-gateway job-launcher="jobLauncher"/> The messageToJobTransformer is a class which can convert a Message into a Job. The problem is I don't know where this file is now neither I want a xml config. I want it to be pure Java DSL. Here is my simple config. return

Spring Integration JPA inbound channel adapter

旧时模样 提交于 2019-12-24 12:34:25
问题 I have a spring-integration message channel which read from a database using a jpa inbound-channel-adapter . <int:channel id="logChannel"> <int:priority-queue capacity="20" /> </int:channel> <int-jpa:inbound-channel-adapter channel="logChannel" entity-class="com.objects.Transactionlog" entity-manager-factory="entityManagerFactory" auto-startup="true" jpa-query="SELECT x FROM Transactionlog AS x WHERE x.status LIKE '1'" max-results="1"> <int:poller fixed-rate="5000"> <int:transactional

What are the right parameters for xmpp-connection (spring integration) to make it work with google gcm?

ぐ巨炮叔叔 提交于 2019-12-24 12:13:55
问题 I want to setup spring-integration-xmpp on my spring app to make it receive upstream messages from android devices. I can already send messages to the android device using http but I cannot set up the xmpp-connection bean so it gives me: failed to connect to gcm-preprod.googleapis.com; nested exception is Connection failed. No response from server.: This is my spring integration configuration: <int:channel id="gcmOutboundNotificationChannel"/> <int-xmpp:xmpp-connection id="xmppConnection"

Spring Integration: Returning stream

大憨熊 提交于 2019-12-24 11:53:40
问题 I am very new to Spring Integration and trying to figure out how to return a stream of data, but cannot find any examples. I found documentation around the ByteStreamWritingMessageHandler, but it seems kind of vague to me and doesn't provide an example of usage (other than bean definition). I'm assuming what I need to do is define a channel that uses the ByteStreamWritingMessageHandler and reference it in my inbound-gateway (via reply-channel), but I have some questions: First, am I right?

How to check if aws s3 bucket available before uploading file using outbound gateway

孤街浪徒 提交于 2019-12-24 11:36:31
问题 using aws s3 outbound adapter in spring boot application,trying to upload files in s3 bucket. would like to check if bucket available before uploading file. if bucket is not available need to throw error. suggest on this. <int-aws:s3-outbound-gateway id="FileChannelS3" request-channel="filesOutS3CChainChannel" reply-channel="filesArcChannel" transfer-manager="transferManager" bucket-expression="headers.TARGET_BUCKET" command="UPLOAD"> <int-aws:request-handler-advice-chain> <ref bean=

Clone table from database to database

我的未来我决定 提交于 2019-12-24 11:35:54
问题 I need a solution for getting the whole table from one DB instance (DB1) and creation the same on another DB instance (DB2). Earlier I used Spring Integration tightly, but I heard that Spring Batch can fit better for such a case and I would like to try it. So, is it possible/have a sence to use Spring Batch job with the following steps: Create an empty table on DB2 having the same schema as a source table from DB1. Select from DB1 table -> update DB2 table. In case smth wrong during the step

How to eliminate bogus “Referenced bean … not found” warnings in STS?

风流意气都作罢 提交于 2019-12-24 11:25:09
问题 STS (3.6.1 and others), Spring 4.1.x (latest), Spring Integration 4.1.2 In many Spring projects I work on in Eclipse/STS, we have numerous "Referenced bean not found" warnings. These often refer to internal Spring beans/classes, not legitimate mis-configuration of our own beans. Here's an example from one of our Spring Data JPA configurations: Referenced bean 'jpaMappingContext' not found [config set: c-r-core/primary] The relevant configuration is just: <?xml version="1.0" encoding="UTF-8"?>

Spring Integration ftp inboud channel processing files in specific order

社会主义新天地 提交于 2019-12-24 10:29:04
问题 I'm using Spring Integration to poll files from remote FTP server and process them. Is there a way to configure FtpInboundFileSynchronizer (or other component) to fetch and process remote files in specific order. Say i have file1 and file2 in remote directory, is it possible to fetch and process file1 before file2. Thanks in advance 回答1: There are (at least) 3 techniques to achieve this: Add a custom FileListFilter<FTPFile> (that sorts the FTPFile objects into the order you desire) to the

Spring FTP Inbound channel not working

廉价感情. 提交于 2019-12-24 09:20:57
问题 I am trying to use FtpInboundFileSynchronizer and unable to fix it. It is not reporting any problem and also not working. I am referring code from http://docs.spring.io/spring-integration/reference/html/ftp.html#_configuring_with_java_configuration_10 import java.io.File; import java.io.IOException; import java.util.Arrays; import org.apache.commons.net.ftp.FTPFile; import org.apache.log4j.Logger; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.builder