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

	<beans profile="preferred">
		<bean id="test-job" class="org.springframework.batch.core.job.JobSupport">
			<property name="name" value="${bar}" />
		</bean>

		<context:property-placeholder order="0" properties-ref="myProperties"/>
		
	    <bean id="myProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
	        <property name="properties">
	            <props>
	                <prop key="bar">spam</prop>
	            </props>
	        </property>
	    </bean>
	</beans>
	
	<beans profile="other">
		<bean id="test-job" class="org.springframework.batch.core.job.JobSupport">
			<property name="name" value="${bar}" />
		</bean>

		<context:property-placeholder order="0" properties-ref="myProperties"/>
		
	    <bean id="myProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
	        <property name="properties">
	            <props>
	                <prop key="bar">foo</prop>
	            </props>
	        </property>
	    </bean>
	</beans>
</beans>
