BATCH-2161 ScopeConfiguration methods should be static
The scope bean factory methods in ScopeConfiguration are BeanFactoryPostProcessors and should therefore be static. - Declare the scope beans in ScopeConfiguration as static Issue: BATCH-2161
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
b49eea78de
commit
1e938e3e2b
@@ -129,19 +129,18 @@ public abstract class AbstractBatchConfiguration implements ImportAware {
|
|||||||
@Configuration
|
@Configuration
|
||||||
class ScopeConfiguration {
|
class ScopeConfiguration {
|
||||||
|
|
||||||
private StepScope stepScope = new StepScope();
|
|
||||||
|
|
||||||
private JobScope jobScope = new JobScope();
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public StepScope stepScope() {
|
public static StepScope stepScope() {
|
||||||
|
StepScope stepScope = new StepScope();
|
||||||
stepScope.setAutoProxy(false);
|
stepScope.setAutoProxy(false);
|
||||||
return stepScope;
|
return stepScope;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public JobScope jobScope() {
|
public static JobScope jobScope() {
|
||||||
|
JobScope jobScope = new JobScope();
|
||||||
jobScope.setAutoProxy(false);
|
jobScope.setAutoProxy(false);
|
||||||
return jobScope;
|
return jobScope;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user