javaconf: beans with same name in independent conf files should cause an error [SPR-8525] #13169
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
Stepan Koltsov opened SPR-8525 and commented
public class QuietlyOverrides {
} //~
We have large application, and one developer accidentally created a bean with name same as name of bean in another part of application. Problem search was not easy.
I think Spring should throw an error if independent configurations declare beans with same name. Configurations are independent if neither of which include another configuration directly or indirectly.
However, IF Conf2 includes Conf1, Spring should quietly override bean declared in Conf1 with bean declared if Conf2, as it does now. It is convenient to "inherit" configuration and override some bean definitions.
Affects: 3.1 M2
The text was updated successfully, but these errors were encountered: