-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Not possible to use step scope when allowBeanDefinitionOverriding is false [BATCH-2552] #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, affected by this problem too. Have to enable bean overrides to be able to use spring-batch :-( I have written this simple maven project that allows to reproduce the issue: The issue seems to have been reported 4 years ago in 2016. I am not against working on fix, but I have a hard time understanding what can be done in the BatchScopeSupport and what is the use of each line. I would need help. |
Fixes BATCH-2552 Fixes spring-projects#1050
I tried to do a contribution with a fix... But I am having a hard time reproducing the issue with a unit test: The unit test I have modified raises a NoUniqueBeanDefinitionException, not a BeanDefinitionOverrideException... |
Hi all. Have app with several xml files with different batch job. |
in definitive migrated successfully by using the @EnableBatchProcessing annotation, but with the modular = true option. It allows to define a BatchConfigurer object that allowed to inject the customized beans (notably the PlatformTransactionManager). Maybe that could be an option for you too? BTW Thanks for the help in Gitter. |
I think current issue is: https://docs.spring.io/spring-batch/docs/current/reference/html/step.html#step-scope
Sooo. In our case we have
Have not checked yet but. Bean factory tries to declare beans by @ImportResours Maybe that could be an option for you too? @mederel Does it work with allowBeanDefinitionOverriding =false ? |
This should be resolved with #3942 . If anyone has the same issue with v5, please add a comment here and we will dig deeper. |
Marcin Kiełbasiński opened BATCH-2552 and commented
Step scope is implemented as bean factory post processor and it registers proxy under the same name as target.
Affects: 3.0.7
The text was updated successfully, but these errors were encountered: