java - How to enforce loading order of spring configuration classes? - Stack Overflow
So I was able to solve this. As it pointed out it had nothing to do with the loading order of the configuration classes (which was my first thought).
As you may notice, the only Configuration that had a @ComponentScan
annotation was the FooApplication.class Spring was not able to find the Repositories, as it didn't know where to look for. Providing the basePackages attribute like this:
@EnableJpaRepositories(basePackages = "de.foobar.rootpackage")
at the TestRepositoryConfig.class did the trick here.
Read full article from java - How to enforce loading order of spring configuration classes? - Stack Overflow
No comments:
Post a Comment