Skip to content

Fine-grained control on bean-overriding restriction rules in DefaultListableBeanFactory #23231

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

Closed
qwazer opened this issue Jul 3, 2019 · 1 comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another

Comments

@qwazer
Copy link

qwazer commented Jul 3, 2019

Affects: 4.x, 5.0, 5.1, 5.2


It's possible to allow more fine-grained control on bean-overriding restriction rules in DefaultListableBeanFactory?

In Spring 5.2 and 4.x, DefaultListableBeanFactory has only one property allowBeanDefinitionOverriding.
But what to do If user want to allow only some overriding like replacing of bean with step scoped bean, where step is scope coming from Spring Batch.

The example with Spring Batch+Spring Boot+Using step scope show that in some cases fine-grained control can be useful.
Related SO questions:
https://stackoverflow.com/questions/55737684/jobscope-and-overriding-beans
https://stackoverflow.com/questions/35498037/spring-batch-with-scoped-beans-and-allowbeandefinitionoverriding-false

@qwazer qwazer changed the title Partially allow bean definition overriding in DefaultListableBeanFactory Fine-grained control on bean-overriding restriction rules in DefaultListableBeanFactory Jul 3, 2019
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 3, 2019
@rstoyanchev rstoyanchev added the in: core Issues in core modules (aop, beans, core, context, expression) label Nov 11, 2021
@snicoll
Copy link
Member

snicoll commented Sep 28, 2023

Thanks for the suggestion but we're now leaning towards deprecating the whole mechanism so being more lenient is not consistent with that.

Superseded by #31288

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2023
@snicoll snicoll added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

4 participants