This commit is contained in:
@@ -47,6 +47,10 @@ public class StepScopePlaceholderIntegrationTests implements BeanFactoryAware {
|
||||
@Qualifier("bar")
|
||||
private Collaborator bar;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("nested")
|
||||
private Collaborator nested;
|
||||
|
||||
private StepExecution stepExecution;
|
||||
|
||||
private ListableBeanFactory beanFactory;
|
||||
@@ -128,4 +132,9 @@ public class StepScopePlaceholderIntegrationTests implements BeanFactoryAware {
|
||||
assertEquals("[bar]", list.getList().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNested() throws Exception {
|
||||
assertEquals("bar", nested.getParent().getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,15 @@
|
||||
<property name="parent" value="#{stepExecutionContext[parent]}" />
|
||||
</bean>
|
||||
|
||||
<bean id="nested" class="org.springframework.batch.core.scope.TestCollaborator">
|
||||
<property name="name" value="foo" />
|
||||
<property name="parent">
|
||||
<bean class="org.springframework.batch.core.scope.TestCollaborator" scope="step">
|
||||
<property name="name" value="#{stepExecutionContext[foo]}" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="list" class="org.springframework.batch.core.scope.TestCollaborator" scope="step">
|
||||
<property name="name" value="foo" />
|
||||
<property name="list">
|
||||
|
||||
Reference in New Issue
Block a user