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
|
||||
class ScopeConfiguration {
|
||||
|
||||
private StepScope stepScope = new StepScope();
|
||||
|
||||
private JobScope jobScope = new JobScope();
|
||||
|
||||
@Bean
|
||||
public StepScope stepScope() {
|
||||
public static StepScope stepScope() {
|
||||
StepScope stepScope = new StepScope();
|
||||
stepScope.setAutoProxy(false);
|
||||
return stepScope;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public JobScope jobScope() {
|
||||
public static JobScope jobScope() {
|
||||
JobScope jobScope = new JobScope();
|
||||
jobScope.setAutoProxy(false);
|
||||
return jobScope;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user