We are using Spring Data JPA 1.10.11.RELEASE, therefore using Spring Data Commons 1.12.11.RELEASE. Integration test boot is particularly slow on our biggest application. After some digging, we found out that Spring Data ignition via CustomRepositoryImplementationDetector.detectCustomImplementation() takes 45 seconds.
I didn't find any issue opened on Spring Framework or Spring Data about this. I didn't notice a massive change of this part of the source code in the incoming Spring Data 2.0. This discourages our collaborators from writing integration test
Do you have more information you can add as otherwise it's really hard to act on what you describe. Looks like the actual bottleneck is a class in Spring Framework. I'd be interested in how many repository interfaces your project contains, and whether they're located in packages with many sub-packages
If you use namespace configuration, the repository infrastructure tries to autodetect custom implementations by scanning for classes below the package we found a repository in.
This is not the case. CustomRepositoryImplementationDetector looks for the implementation anywhere in the base package.
We have a large codebase, looking for a single implementation that way takes hundreds of milliseconds. Multiply that by our 260 repositories, and you get startup times close to a minute.
Limiting the package search as documented would probably fix the problem
That's now merged into Ingalls and Hopper bugfix branches as well as master for Kay. I didn't merge the addition of a config option top enable exhaustive scanning again, to see whether users were really relying on that