Allow @Bean in test classes to override beans loaded via @ContextConfiguration [SPR-7169] #11828
Labels
in: test
Issues in the test module
status: superseded
An issue that has been superseded by another
type: enhancement
A general enhancement
Oliver Drotbohm opened SPR-7169 and commented
It would be cool if test classes executed with
SpringJUnit4ClassRunner
would be considered as@Configuration
classes, too. This way the following would be possible.IMHO this has the benefit of not polluting the test resources with zillions of config files that you might want to declare to override certain beans from your default configuration (which you would additionally load inside
@ContextConfigLocation
). As this co-locates customization needed for the tests and the tests themselves it reduces scattering of artifacts needed for the tests.Affects: 3.0.2
3 votes, 7 watchers
The text was updated successfully, but these errors were encountered: