Well 2 minutes for your integration tests is still faster then 1 or 2 testers integration testing your application
. But I get your concern.
1 thing you could do is reduce the number of component-scan elements saves you instantiation time of each element. the base-package attribute can take a comma separated list of packages. That probably gives you a bit of a performance gain.
Code:
<context:component-scan base-package="com.mycompany.container,api.mycompany.catalog,com.mycompany.ads....../>
The scanning of the classpath is hardcoded into the ClassPathScanningCandidateComponentProvider so no way of influencing that. You might consider registering a JIRA to make this configurable (scan all (classpath*
or limited (classpath: ).
Thats the best I can come up with for now.