Description
Sam Brannen opened SPR-6050 and commented
In the Spring TestContext Framework (i.e., specifically in AbstractGenericContextLoader), annotation-driven autowiring is automatically enabled. In other words, all ApplicationContexts created by subclasses of AbstractGenericContextLoader (e.g., GenericXmlContextLoader) are automatically configured to process annotations.
If you explicitly wish that annotation processing not be enabled for the configuration files you specify -- for example, if some of the beans are annotated with @Autowired
, etc. but you do not want those beans to be autowired -- you are at a loss: there is currently no way to disable this.
As indirectly suggested in the forum, it would be nice if Spring provided a mechanism for disabling automatic annotation-driven autowiring in tests.
Affects: 2.5.6
Reference URL: http://forum.springsource.org/showthread.php?t=74298
Issue Links:
- Load dedicated child ApplicationContext for test instance in the TestContext framework [SPR-4632] #9309 Load dedicated child ApplicationContext for test instance in the TestContext framework
- Test instances should not be proxied in the TestContext framework [SPR-9478] #14113 Test instances should not be proxied in the TestContext framework
2 votes, 2 watchers