Closed
Description
Wojciech Krak opened SPR-10971 and commented
I think that would be nicer if the TestContext framework would throw an exception if a class declared via @ContextConfiguration#classes
is not annotated with @Configuration
.
If a configuration class has many annotations it is easy to forget to annotate it with @Configuration
. With the status quo, it is possible that an empty application context is created, which can be a bit surprising.
Affects: 3.2.4
Issue Links:
- spring-test allows you to reference configuration classes that aren't annotated with @Configuration [SPR-9051] #13690 spring-test allows you to reference configuration classes that aren't annotated with
@Configuration
Referenced from: commits 7ffd05a