recently faced with the issue that profiles feature enabled with spring 3.1 using multiple < beans > definition doesn't work for spring batch own tag.
<beans profile="prod">
<bean id ="test" class="java.lang.String"></bean>
<batch:job id="job" abstract="true" >
<batch:listeners>
<batch:listener ref="jobExecutionContextDateSetter" />
<batch:listener ref="jobStatusListener"/>
</batch:listeners>
</batch:job>
</beans>
<beans profile="dev">
<bean id ="test" class="java.lang.String"></bean>
<batch:job id="job" abstract="true" >
<batch:listeners>
<batch:listener ref="jobExecutionContextDateSetter" />
</batch:listeners>
</batch:job>
</beans>
running the test example (with out enabling either of profiles) spring complains about multiple annotation found for id "job". Any ideas ?