Reputation: 14458
I have an application A and a library B.
And correspondingly, the context config files: a.xml
and b.xml
. b.xml
is not complete, it requires a.xml
to work.
However, I can't just import b.xml
in a.xml
, because the path of b.xml
is not determined. I want some kind of automatic discover to use. (Which maybe similar to java.util.ServiceLoader.)
Is it possible?
Upvotes: 0
Views: 635
Reputation: 14458
Using @Configuration for library defined beans, and Spring will integrate all @Configuration beans and beans defined in context xmls for main application at last.
Upvotes: 1