-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Rossen Stoyanchev opened SPR-8320 and commented
If you instantiate AnnotationConfigWebApplicationContext in a JUnit test or standalone code the only option to register @Configuration classes is to use setConfigLocation(String) or setConfigLocations(String[]). This means you have to convert configuration class names to a String based location that contains the class. Although this is simple (using clazz.getName() will do), it's not immediately obvious what the syntax for the String should be.
For comparison AnnotationConfigApplicationContext does provide a register(Class<?>... annotatedClasses) method. It would make sense to have such a method on AnnotationConfigWebApplicationContext as well for parity.
Affects: 3.0.5, 3.1 M1
Attachments:
- mylyn-context.zip (3.65 kB)
Issue Links:
- Introduce AnnotationConfigCapableApplicationContext interface to unify ACAC and ACWAC operations [SPR-8365] #13012 Introduce AnnotationConfigCapableApplicationContext interface to unify ACAC and ACWAC operations