BATCH-2253: Added automatic registraiton of Job Scope to java config and
added support for a @JobScope annotation.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" 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">
|
||||
|
||||
<bean class="org.springframework.batch.core.scope.JobScope">
|
||||
<property name="proxyTargetClass" value="true" />
|
||||
</bean>
|
||||
|
||||
<bean id="parent" class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleHolder" scope="job" abstract="true">
|
||||
<constructor-arg value="#{jobName}" />
|
||||
</bean>
|
||||
|
||||
<bean id="child" class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleHolder" parent="parent"/>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" 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">
|
||||
|
||||
<bean class="org.springframework.batch.core.scope.JobScope" />
|
||||
|
||||
<bean class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleCallable"
|
||||
scope="job">
|
||||
<constructor-arg value="#{jobName}" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" 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">
|
||||
|
||||
<bean class="org.springframework.batch.core.scope.JobScope">
|
||||
<property name="proxyTargetClass" value="true" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleHolder" scope="job">
|
||||
<constructor-arg value="#{jobName}" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user