I have two projects namely A and B. Project A has a class C which has several global variables autowired. Project B has a class D which has to use an instance of class C for multiple purposes.
I would like to autowire the instance of C within the class D as defined in project A but keep in mind that D belongs to B.
Is there anyway I can achieve this ? For instance a way to say : ” Project B, when trying to find out how to autowire classes consider the definitions and components that are defined in project A”
If you’re mounting Spring JARs from other Spring projects, and you are using annotation scanning, then for your search path, you can use:
That ‘*’ in the classpath says search the entire class path, not just the classes in the JAR you’re running out of.