<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd">

	<channel id="output">
		<queue/>
	</channel>

	<transformer input-channel="simpleInput" expression="payload.foo + headers.bar" output-channel="output"/>

	<transformer input-channel="beanResolvingInput" expression="@testBean.foo + payload.toUpperCase()" output-channel="output"/>

	<transformer input-channel="spelFunctionInput" expression="#trim(payload)" output-channel="output"/>

	<beans:bean id="testBean" class="org.springframework.integration.transformer.SpelTransformerIntegrationTests$TestBean"/>

	<chain id="transformerChain" input-channel="transformerChainInput">
		<transformer expression="null"/>
	</chain>

	<spel-function id="trim" class="org.springframework.util.StringUtils" method="trimWhitespace"/>


	<beans:bean id="integrationEvaluationContext" class="org.springframework.integration.config.IntegrationEvaluationContextFactoryBean">
		<beans:property name="propertyAccessors">
			<util:map>
				<beans:entry key="foo">
					<beans:bean class="org.springframework.integration.transformer.SpelTransformerIntegrationTests$FooAccessor"/>
				</beans:entry>
			</util:map>
		</beans:property>
		<beans:property name="functions">
			<util:map>
				<beans:entry key="bar"
					value="#{T(org.springframework.integration.transformer.SpelTransformerIntegrationTests$BarFunction).getMethod('bar', T(org.springframework.messaging.Message))}"/>
			</util:map>
		</beans:property>
	</beans:bean>

	<spel-property-accessors>
		<index-accessors>
			<beans:bean id="jsonIndex" class="org.springframework.integration.json.JsonIndexAccessor"/>
		</index-accessors>
		<beans:bean id="fooAccessor1" class="org.springframework.integration.transformer.SpelTransformerIntegrationTests$FooAccessor"/>
		<beans:ref bean="fooAccessor"/>
	</spel-property-accessors>

	<beans:bean id="fooAccessor" class="org.springframework.integration.transformer.SpelTransformerIntegrationTests$FooAccessor"/>

	<channel id="fooin" />

	<transformer id="foo" input-channel="fooin" expression="payload.bar" />

	<channel id="functionIn" />

	<transformer id="bar" input-channel="functionIn" expression="#bar(#root)" />

</beans:beans>
