spring-integration

How to set payload as constructor-arg value in service-activator

孤人 提交于 2020-01-25 16:20:09
问题 I've started with SI and kind of stuck right now as we want to use SI in one of our existing project avoiding changes where we can. A bean which we would be using as a service activator accepts an constructor argument of a java object. that object is in the payload but then I'm unable to set it using inner bean usage of service-activator <service-activator input-channel="ADMIN_TEST_CONNECTION" method="testConnection"> <beans:bean class="mypackage.request.AdminRequestProcessor"> <beans

Unable to cache SFTP connection with Spring Integration

醉酒当歌 提交于 2020-01-25 01:35:49
问题 I need to transfer several small files via SFTP using spring integration, so I'd like to reuse a connection once established to avoid the overhead of creating a new one for every single message. This is my current configuration: <bean id="sftpTARGETSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory"> <constructor-arg name="isSharedSession" value="true"/> <property name="host" value="${TARGET.push.host}"/> <property name="user" value="${TARGET.push

spring integration dsl http outboundgateway

£可爱£侵袭症+ 提交于 2020-01-24 19:43:04
问题 We are trying to call a REST API using HTTP OutboundGateway using DSL. We are able to make the call using both GET and POST and getting the response as expected. However we couldnt figure a way to pass http headers while making this call using DSL. There are quite a lot of articles about XML approach but couldnt find out documentation with DSL return IntegrationFlows.from("FileContentChannel") .handle(Http.outboundGateway("http://host:port/paymentinfo/") .charset("UTF-8") .httpMethod

spring integration : response message not sent to client from error-channel

旧城冷巷雨未停 提交于 2020-01-24 13:03:52
问题 I've the understanding that Spring Integration (SI) will wrap any exception (under the SI domain) to a MessageException instance and place it on the "error-channel". Following are few snippets from my spring config file : <int:channel-interceptor pattern="ersServiceReqRcvPostValidationChannel,ersServiceResRcvPostValidationChannel" order="1"> <bean class="com.bnym.ecs.report.service.orchestration.interceptors.MsgJSONSyntaxValidationInterceptor"/> </int:channel-interceptor> <int:channel

spring integration : response message not sent to client from error-channel

不想你离开。 提交于 2020-01-24 13:03:11
问题 I've the understanding that Spring Integration (SI) will wrap any exception (under the SI domain) to a MessageException instance and place it on the "error-channel". Following are few snippets from my spring config file : <int:channel-interceptor pattern="ersServiceReqRcvPostValidationChannel,ersServiceResRcvPostValidationChannel" order="1"> <bean class="com.bnym.ecs.report.service.orchestration.interceptors.MsgJSONSyntaxValidationInterceptor"/> </int:channel-interceptor> <int:channel

spring integration : response message not sent to client from error-channel

此生再无相见时 提交于 2020-01-24 13:03:05
问题 I've the understanding that Spring Integration (SI) will wrap any exception (under the SI domain) to a MessageException instance and place it on the "error-channel". Following are few snippets from my spring config file : <int:channel-interceptor pattern="ersServiceReqRcvPostValidationChannel,ersServiceResRcvPostValidationChannel" order="1"> <bean class="com.bnym.ecs.report.service.orchestration.interceptors.MsgJSONSyntaxValidationInterceptor"/> </int:channel-interceptor> <int:channel

Spring Security - 'global-method-security' does not work

别来无恙 提交于 2020-01-24 12:12:49
问题 I am a newbie regarding Spring & Spring Security Frameworks and trying to secure a Java EE 7 REST App running on latest stable Glassfish build using Spring Security v3.1.4. Everything is fine but i cannot manage to make 'global-method-security' work ! Here are my configs, any help would be greatly appreciated. web.xml: <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring/*.xml </param-value> </context-param> <filter> <filter-name>filterChainProxy<

Spring Security - 'global-method-security' does not work

匆匆过客 提交于 2020-01-24 12:12:07
问题 I am a newbie regarding Spring & Spring Security Frameworks and trying to secure a Java EE 7 REST App running on latest stable Glassfish build using Spring Security v3.1.4. Everything is fine but i cannot manage to make 'global-method-security' work ! Here are my configs, any help would be greatly appreciated. web.xml: <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring/*.xml </param-value> </context-param> <filter> <filter-name>filterChainProxy<

How to cleanup the metadata store used for idempotent spring integration pattern

你说的曾经没有我的故事 提交于 2020-01-24 08:50:31
问题 I am using the idempotent receiver pattern in my spring integration flow to detect duplicate messages. https://docs.spring.io/spring-integration/docs/5.0.5.RELEASE/reference/html/system-management-chapter.html#metadata-store In above link it says The value of the idempotent entry may be some expiration date, after which that entry should be removed from Metadata Store by some scheduled reaper. Is there any utility/scheduler available that is provided by spring to clean up the INT_METADATA

How to dynamically define file filter pattern for Spring Integration SFTP Inbound Adapter?

社会主义新天地 提交于 2020-01-23 12:05:57
问题 I need to dynamically pull specific files from different directories from different sftp servers to a local server directory of a spring boot application. I store the paths and a file pattern in a postgres database. I got everything working but i don't know how to dynamically define a file filter pattern depending on the remote directory for spring integration sftp inbound adapter so that not all xml files in that specific directory are pulled. I use a RotatingServerAdvice and a