<?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:int="http://www.springframework.org/schema/integration"
	xmlns:int-zip="http://www.springframework.org/schema/integration/zip"
	xmlns:int-file="http://www.springframework.org/schema/integration/file"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd
		http://www.springframework.org/schema/integration/file https://www.springframework.org/schema/integration/file/spring-integration-file.xsd
		http://www.springframework.org/schema/integration/zip https://www.springframework.org/schema/integration/zip/spring-integration-zip.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd">

	<context:property-placeholder/>

	<int:channel id="input"/>

	<int:chain input-channel="input" output-channel="out">
		<int-zip:unzip-transformer result-type="BYTE_ARRAY"/>
		<int:splitter>
			<bean class="org.springframework.integration.zip.splitter.UnZipResultSplitter"/>
		</int:splitter>
	</int:chain>

	<int:channel id="out">
		<int:interceptors>
			<int:wire-tap channel="logger"/>
		</int:interceptors>
	</int:channel>

	<int:logging-channel-adapter id="logger" log-full-message="true" level="INFO"/>

	<int-file:outbound-channel-adapter id="write-file" channel="out" directory-expression="'${workDir}/' + headers.zip_entryPath"/>

</beans>
