forked from spring-attic/spring-batch-admin
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathintegration-context.xml
More file actions
37 lines (28 loc) · 2.43 KB
/
integration-context.xml
File metadata and controls
37 lines (28 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:integration="http://www.springframework.org/schema/integration" xmlns:http="http://www.springframework.org/schema/integration/http"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/integration/http http://www.springframework.org/schema/integration/http/spring-integration-http.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />
<integration:channel id="job-configuration-multipart" />
<integration:transformer id="multipartToJobConfigurationRequest" input-channel="job-configuration-multipart"
output-channel="job-configuration-requests">
<bean class="org.springframework.batch.admin.integration.MultipartToJobConfigurationRequestTransformer" />
</integration:transformer>
<http:inbound-channel-adapter path="/job-configuration" channel="job-configuration-multipart"
request-payload-type="org.springframework.batch.admin.integration.MultipartJobConfigurationRequest" view-name="redirect:jobs"
supported-methods="POST" message-converters="multipartJobConfigurationRequestHttpMessageConverter" />
<http:inbound-gateway path="/job-configuration.json" request-channel="job-configurations"
reply-key="jobs" reply-channel="job-registrations" request-payload-type="org.springframework.core.io.Resource"
view-name="jobs" supported-methods="POST" message-converters="resourceHttpMessageConverter" />
<bean name="redirect:jobs" class="org.springframework.web.servlet.view.RedirectView">
<property name="url" value="#{resourceService.servletPath}/jobs" />
<property name="contextRelative" value="true" />
</bean>
<bean id="resourceHttpMessageConverter" class="org.springframework.http.converter.ResourceHttpMessageConverter" />
<bean id="multipartJobConfigurationRequestHttpMessageConverter" class="org.springframework.batch.admin.web.BindingHttpMessageConverter">
<property name="targetType" value="org.springframework.batch.admin.integration.MultipartJobConfigurationRequest" />
</bean>
</beans>